Themes: add validation check if a mapping does not erase another mapping completely

This commit is contained in:
Pieter Vander Vennet 2023-11-09 15:42:15 +01:00
parent 7d43bb5983
commit 556f6d0b93
43 changed files with 5015 additions and 4778 deletions

View file

@ -32,7 +32,7 @@
let thenText: UIEventSource<Record<string, string>> = state.getStoreFor([...path, "then"])
let thenTextEn = thenText .mapD(translation => typeof translation === "string" ? translation : translation["en"] )
let editMode = Object.keys($thenText).length === 0;
let editMode = Object.keys($thenText ?? {})?.length === 0;
let mappingConfigs: ConfigMeta[] = configs.filter(c => c.path[0] === "mappings")
.map(c => <ConfigMeta>Utils.Clone(c))