This commit is contained in:
undefined committed 2020-05-04 12:34:00 +08:00
1 parent 649f65b17d
commit e3bbff7e11
22 files changed
+315 -441

No files matched your search

+3 -1
View File
@@ -28,7 +28,9 @@ String.prototype.rawformat = function rawFormat(object) {
};
String.prototype.translate = function translate(language = 'zh_CN') {
if (locales[language]) return locales[language][this] || this;
if (locales[language]) {
if (locales[language][this] !== undefined) return locales[language][this];
}
return this;
};
+1 -1
View File
@@ -7,7 +7,7 @@ const misc = require('./misc');
function Loader() { }
Loader.prototype.getSource = function getSource(name) {
if (!global.Hydro.template[name]) throw new Error();
if (!global.Hydro.template[name]) throw new Error(`Cannot get template ${name}`);
return {
src: global.Hydro.template[name],
path: name,