Skip to content

Commit 771afd3

Browse files
christianalfoniSaraVieira
authored andcommitted
fix perf issue (codesandbox#2503)
1 parent b8618ed commit 771afd3

File tree

1 file changed

+3
-1
lines changed
  • packages/app/src/app/overmind/namespaces/editor

1 file changed

+3
-1
lines changed

packages/app/src/app/overmind/namespaces/editor/actions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ export const prettifyClicked: AsyncAction = async ({
359359
};
360360

361361
export const errorsCleared: Action = ({ state }) => {
362-
state.editor.errors = [];
362+
if (state.editor.errors.length) {
363+
state.editor.errors = [];
364+
}
363365
};
364366

365367
export const toggleStatusBar: Action = ({ state }) => {

0 commit comments

Comments
 (0)