diff --git a/app/client/components/Layout.js b/app/client/components/Layout.js index 1814d82a..312da743 100644 --- a/app/client/components/Layout.js +++ b/app/client/components/Layout.js @@ -439,6 +439,9 @@ Layout.prototype.buildLayout = function(boxSpec, needDynamic) { Layout.prototype._getBoxSpec = function(layoutBox) { var spec = {}; + if (layoutBox.isDisposed()) { + return spec; + } if (layoutBox.flexSize() && layoutBox.flexSize() !== 100) { spec.size = layoutBox.flexSize(); } diff --git a/app/client/components/LinkingState.ts b/app/client/components/LinkingState.ts index e6f3b8ac..05b4068c 100644 --- a/app/client/components/LinkingState.ts +++ b/app/client/components/LinkingState.ts @@ -138,6 +138,10 @@ export class LinkingState extends Disposable { ): ko.Computed { return this.autoDispose(ko.computed(() => { const srcRowId = this._srcSection.activeRowId(); + if (srcRowId === null) { + console.warn("_simpleFilter activeRowId is null"); + return { filters: {}, operations: {}}; + } const values = valuesFunc(srcRowId); return {filters: {[colId]: values}, operations: {[colId]: operation}} as FilterColValues; })); diff --git a/app/client/models/entities/ViewSectionRec.ts b/app/client/models/entities/ViewSectionRec.ts index 702e0f40..9bcc7d56 100644 --- a/app/client/models/entities/ViewSectionRec.ts +++ b/app/client/models/entities/ViewSectionRec.ts @@ -410,7 +410,7 @@ export function createViewSectionRec(this: ViewSectionRec, docModel: DocModel): this.linkSrcCol = refRecord(docModel.columns, this.activeLinkSrcColRef); this.linkTargetCol = refRecord(docModel.columns, this.activeLinkTargetColRef); - this.activeRowId = ko.observable(); + this.activeRowId = ko.observable(null); // If the view instance for this section is instantiated, it will be accessible here. this.viewInstance = ko.observable(null);