Skip to content

Commit

Permalink
fix: if loadCommon then there are resources (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart authored Nov 21, 2024
1 parent d35e3b6 commit 9ea8303
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/localize.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ export const getLocalizeClass = (superclass = class {}) => class LocalizeClass e
}

_hasResources() {
return this.constructor.localizeConfig ? Boolean(this.constructor.localizeConfig.importFunc) : this.constructor.getLocalizeResources !== undefined;
if (this.constructor.localizeConfig) {
return this.constructor.localizeConfig !== undefined ||
this.constructor.localizeConfig.loadCommon === true;
}
return this.constructor.getLocalizeResources !== undefined;
}

async #localeChangeHandler() {
Expand Down

0 comments on commit 9ea8303

Please sign in to comment.