Skip to content

Commit

Permalink
Merge 99d5b04 into 6a102d1
Browse files Browse the repository at this point in the history
  • Loading branch information
myronenko authored Oct 24, 2023
2 parents 6a102d1 + 99d5b04 commit a968eda
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@
"use strict";
ns.image.v3.actions.smartCrop = function() {
const editable = this;
authorNs.DialogFrame.openDialog(new ns.image.v3.smartCropDialog(editable));
if (this.authorNs) {
authorNs.DialogFrame.openDialog(new ns.image.v3.smartCropDialog(editable));
}
};

ns.image.v3.actions.smartCrop.condition = function(editable) {
return authorNs.pageInfoHelper.canModify() && hasNGDMSmartCropAction(editable) && isNGDMImage(editable);
if (this.authorNs) {
return authorNs.pageInfoHelper.canModify() && hasNGDMSmartCropAction(editable) && isNGDMImage(editable);
}
};

function hasNGDMSmartCropAction(editable) {
Expand Down

0 comments on commit a968eda

Please sign in to comment.