Bundle using webpack.

This commit is contained in:
Manuel Friedli 2019-05-05 02:44:01 +02:00
parent 1929209937
commit 933a3c92f5
29 changed files with 368 additions and 16162 deletions

View file

@ -51,11 +51,11 @@ export class Globals {
return Globals.themes;
}
static registerLayout(langCode: string, layout: Layout): void {
static registerLayout(layout: Layout): void {
const available = Globals.layouts.some(element => {
if (langCode === element.code) {
if (layout.code === element.code) {
console.error(
`Error: Language code '${langCode}' cannot be registered for layout '${layout.prettyName}'
`Error: Language code '${layout.code}' cannot be registered for layout '${layout.prettyName}'
because it is already registered for layout '${element.prettyName}'!`
);
return false;
@ -64,7 +64,6 @@ export class Globals {
}
);
if (available) {
layout.code = langCode;
Globals.layouts.push(layout);
}
}