mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 03:05:51 +03:00
Fix DeprecationWarning
the copy-res.js did throw "(node:8688) DeprecationWarning: Calling an asynchronous function without callback is deprecated." before
This commit is contained in:
parent
7c13e2d0ab
commit
4225813523
1 changed files with 7 additions and 2 deletions
|
@ -167,9 +167,14 @@ function genLangList() {
|
||||||
languages[normalizedLanguage] = {'fileName': lang.value + '.json', 'label': lang.label};
|
languages[normalizedLanguage] = {'fileName': lang.value + '.json', 'label': lang.label};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4));
|
fs.writeFile('webapp/i18n/languages.json', JSON.stringify(languages, null, 4), function(err) {
|
||||||
|
if (err) {
|
||||||
|
console.error("Copy Error occured: " + err);
|
||||||
|
throw new Error("Failed to generate languages.json");
|
||||||
|
}
|
||||||
|
});
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log("Generated language list");
|
console.log("Generated languages.json");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue