Skip to content

Commit

Permalink
fix regression introduced in finos#1693
Browse files Browse the repository at this point in the history
  • Loading branch information
Gayathri committed Jan 11, 2023
1 parent e541585 commit c29ea2d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .changeset/mean-oranges-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
'@finos/legend-application-studio': patch
---
20 changes: 15 additions & 5 deletions packages/legend-application-studio/src/stores/EditorStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,21 @@ export class EditorStore implements CommandRegistrar {
if (graphEditor === GRAPH_EDITOR_MODE.GRAMMAR_TEXT) {
// Stop change detection as we don't need the actual change detection in text mode
this.changeDetectionState.stop();
this.changeDetectionState.computeLocalChangesInTextMode(
(yield this.graphManagerState.graphManager.pureCodeToEntities(
this.grammarTextEditorState.graphGrammarText,
)) as Entity[],
);
try {
yield flowResult(
this.changeDetectionState.computeLocalChangesInTextMode(
(yield this.graphManagerState.graphManager.pureCodeToEntities(
this.grammarTextEditorState.graphGrammarText,
)) as Entity[],
),
);
} catch (error) {
assertErrorThrown(error);
this.applicationStore.log.warn(
LogEvent.create(GRAPH_MANAGER_EVENT.PARSING_FAILURE),
error,
);
}
}
}

Expand Down

0 comments on commit c29ea2d

Please sign in to comment.