Skip to content

Commit

Permalink
chore(ui): check if tab exists before setting dirty attribute on it (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosPaunovic authored Oct 11, 2024
1 parent cfc8389 commit 7c81319
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/stores/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export default {
return tab.name === name;
});

state.tabs[tabIdxToDirty].dirty = dirty;
state.current.dirty = dirty;
if(state.tabs[tabIdxToDirty]) state.tabs[tabIdxToDirty].dirty = dirty;
if(state.current) state.current.dirty = dirty;
}
},
closeTabs(state) {
Expand Down

0 comments on commit 7c81319

Please sign in to comment.