From 159e95f2e533baa2ef5bf5aaea930c0c7a90f38e Mon Sep 17 00:00:00 2001 From: An Phi Date: Tue, 10 May 2022 11:54:34 -0400 Subject: [PATCH] fix a regression introduced by #1146 --- packages/legend-studio/src/stores/ChangeDetectionState.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/legend-studio/src/stores/ChangeDetectionState.ts b/packages/legend-studio/src/stores/ChangeDetectionState.ts index 311478af33..fbdfa16f01 100644 --- a/packages/legend-studio/src/stores/ChangeDetectionState.ts +++ b/packages/legend-studio/src/stores/ChangeDetectionState.ts @@ -356,7 +356,6 @@ export class ChangeDetectionState { } stop(force = false): void { - this.graphObserveState.reset(); this.changeDetectionReaction?.(); this.changeDetectionReaction = undefined; if (force) { @@ -752,7 +751,7 @@ export class ChangeDetectionState { } *observeGraph(): GeneratorFn { - if (!this.graphObserveState.isInInitialState) { + if (this.initState.hasSucceeded) { throw new IllegalStateError( `Can't observe graph: change detection must be stopped first`, );