Skip to content

Commit

Permalink
Only save when dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
szschaler authored Dec 8, 2023
1 parent 4c7299d commit bb54642
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platform/src/ProgramPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class ProgramPanel extends Panel {


canSave() {
return true;
// Only save if there are any actual changes to save -- this avoids empty commits.
return !(this.editor.session.getUndoManager().isClean());
}

/**
Expand Down

0 comments on commit bb54642

Please sign in to comment.