Skip to content

Commit

Permalink
Update logic.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Jan 28, 2024
1 parent b2b8fe8 commit 73e0bae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/module/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,12 @@ export class Polyglot {
* @var {Set} this.knownLanguages
*/
updateUserLanguages(html) {
if (game.polyglot.languageProvider.requiresReady && !game.ready) return;
[this.knownLanguages, this.literateLanguages] = this.getUserLanguages();
const defaultLanguage = this.defaultLanguage;
if (this.knownLanguages.size === 0) {
if (game.user.isGM) this.knownLanguages = new Set(Object.keys(this.languageProvider.languages).sort());
else if (defaultLanguage) this.knownLanguages.add(defaultLanguage);
else this.knownLanguages.add(defaultLanguage);
} else if (this.knownLanguages.has(this.omniglot)) {
this.knownLanguages = new Set(Object.keys(this.languageProvider.languages).sort());
}
Expand Down

0 comments on commit 73e0bae

Please sign in to comment.