do not call getByKey when creating new language

This commit is contained in:
Jesper Møller Jensen
2023-01-27 02:43:28 +01:00
parent c5d5068ebb
commit 1b931111d6

View File

@@ -38,9 +38,10 @@ export class UmbWorkspaceLanguageContext {
}
private _observeStore(): void {
if (!this._store) {
if (!this._store || this._entityKey === 'new') {
return;
}
this._storeObserver?.destroy();
this._storeObserver = new UmbObserverController(this.host, this._store.getByKey(this._entityKey), (content) => {
if (!content) return; // TODO: Handle nicely if there is no content data.