Skip to content

Commit

Permalink
don't create drafts if we're not allowed to
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Feb 15, 2024
1 parent 6f3dc64 commit eb1128d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/web/assets/cp/src/js/ElementEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,9 @@ Craft.ElementEditor = Garnish.Base.extend(
name,
value,
}).prependTo(this.$container);
await this.saveDraft();
if (this.settings.canCreateDrafts) {
await this.saveDraft();
}
},

async markDeltaNameAsModified(name) {
Expand Down

0 comments on commit eb1128d

Please sign in to comment.