Skip to content

Commit

Permalink
fix(setup): adjust i18next init; skip 404 errors
Browse files Browse the repository at this point in the history
* use the init method as intended (promise)
* do not reject on 404 errors raised by the backend

related issue #295
  • Loading branch information
zewa666 committed Mar 28, 2019
1 parent c802b25 commit d2256b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ export class I18N {
};

this.i18nextDeferred = new Promise((resolve, reject) => {
this.i18next = this.i18next.createInstance(options || defaultOptions, (err) => {
if (err) {
this.i18next.init(options || defaultOptions, (err) => {
if (err && !Array.isArray(err)) {
reject(err);
}

Expand Down

0 comments on commit d2256b9

Please sign in to comment.