Fix build
This commit is contained in:
parent
8a7d8a43ce
commit
de9dca54bd
1 changed files with 6 additions and 3 deletions
|
@ -2,6 +2,7 @@ import { UIEventSource } from "../../Logic/UIEventSource"
|
|||
import { LocalStorageSource } from "../../Logic/Web/LocalStorageSource"
|
||||
import { Utils } from "../../Utils"
|
||||
import { QueryParameters } from "../../Logic/Web/QueryParameters"
|
||||
import Doc = Mocha.reporters.Doc
|
||||
|
||||
export default class Locale {
|
||||
public static showLinkToWeblate: UIEventSource<boolean> = new UIEventSource<boolean>(false)
|
||||
|
@ -63,9 +64,11 @@ export default class Locale {
|
|||
source = LocalStorageSource.Get("language", browserLanguage)
|
||||
}
|
||||
|
||||
source.addCallbackAndRun((l) => {
|
||||
document.documentElement.setAttribute("lang", l)
|
||||
})
|
||||
if (!Utils.runningFromConsole && typeof document !== undefined) {
|
||||
source.addCallbackAndRun((l) => {
|
||||
document.documentElement.setAttribute("lang", l)
|
||||
})
|
||||
}
|
||||
|
||||
if (!Utils.runningFromConsole) {
|
||||
// @ts-ignore
|
||||
|
|
Loading…
Reference in a new issue