Skip to content

Commit

Permalink
Slight improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
perrin4869 committed Nov 2, 2021
1 parent b0f0e0f commit a719dae
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,6 @@ class I18n extends EventEmitter {

static createInstance = (options = {}, callback) => new I18n(options, callback)

/* eslint class-methods-use-this: 0 */
createInstance(options = {}, callback) {
return I18n.createInstance(options, callback);
}

cloneInstance(options = {}, callback = noop) {
const mergedOptions = { ...this.options, ...options, ...{ isClone: true } };
const clone = new I18n(mergedOptions);
Expand Down Expand Up @@ -601,4 +596,7 @@ class I18n extends EventEmitter {
}
}

export default new I18n();
const instance = I18n.createInstance();
instance.createInstance = I18n.createInstance;

export default instance;

0 comments on commit a719dae

Please sign in to comment.