Skip to content

Commit

Permalink
V12 prototype: Remove deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mclemente committed Dec 13, 2023
1 parent e85f8ac commit 83247b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/module/forms/LanguageSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class PolyglotLanguageSettings extends FormApplication {
await game.settings.set("polyglot", "Languages", game.polyglot.languageProvider.languages);
SettingsConfig.reloadConfirm({ world: true });
} else {
const langSettings = duplicate(game.settings.get("polyglot", "Languages"));
const langSettings = foundry.utils.duplicate(game.settings.get("polyglot", "Languages"));
const fonts = formData["language.alphabet"];
const rng = formData["language.rng"];
let i = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/module/providers/templates/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export default class LanguageProvider {
}
const systemLanguages = CONFIG[game.system.id.toUpperCase()].languages;
Object.keys(systemLanguages).forEach((key) => {
const label = game.i18n.localize(systemLanguages[key]);
const label = typeof systemLanguages[key] === "string" ? game.i18n.localize(systemLanguages[key]) : null;
if (label) {
langs[key] = {
label,
Expand Down Expand Up @@ -435,7 +435,7 @@ export default class LanguageProvider {
* Called when Custom Languages setting is changed.
*/
reloadLanguages() {
const langSettings = deepClone(game.settings.get("polyglot", "Languages"));
const langSettings = foundry.utils.deepClone(game.settings.get("polyglot", "Languages"));
if (JSON.stringify(langSettings) !== JSON.stringify(this.languages) || !Object.keys(langSettings).length) {
return;
}
Expand Down

0 comments on commit 83247b5

Please sign in to comment.