Fixes linking "srcSection disposed" bug (#670)

Test "RawData should remove all tables except one (including referenced
summary table)"

was failing with error: "this._srcSection.activeRowId is not a function"
added an extra isDisposed check to catch it
chainlink-fix
Janet Vorobyeva 9 months ago committed by GitHub
parent 5d7ef23433
commit 5a4433c60c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -308,10 +308,17 @@ export class LinkingState extends Disposable {
//(we autodispose/return it at the end of the function) is this right? TODO JV
return owner.autoDispose(ko.computed(() => {
if (this._srcSection.isDisposed()) {
//happened transiently in test: "RawData should remove all tables except one (...)"
console.warn("LinkingState._makeFilterObs: srcSectionDisposed");
return EmptyFilterState;
}
//Get selector-rowId
const srcRowId = this._srcSection.activeRowId();
if (srcRowId === null) {
console.warn("_makeFilterObs activeRowId is null");
console.warn("LinkingState._makeFilterObs activeRowId is null");
return EmptyFilterState;
}

Loading…
Cancel
Save