Skip to content

Commit 53e4b4c

Browse files
committed
MAGETWO-85421: Build Stabilization
1 parent 7f3e942 commit 53e4b4c

File tree

1 file changed

+10
-6
lines changed
  • app/code/Magento/Ui/view/base/web/js/form/element

1 file changed

+10
-6
lines changed

app/code/Magento/Ui/view/base/web/js/form/element/wysiwyg.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,16 @@ define([
106106
this.$wysiwygEditorButton.removeProp('disabled');
107107
}
108108

109-
if (wysiwyg && disabled) {
110-
wysiwyg.setEnabledStatus(false);
111-
wysiwyg.getPluginButtons().prop('disabled', 'disabled');
112-
} else if (wysiwyg) {
113-
wysiwyg.setEnabledStatus(true);
114-
wysiwyg.getPluginButtons().removeProp('disabled');
109+
/* eslint-disable no-undef */
110+
if (typeof wysiwyg !== 'undefined' && wysiwyg.activeEditor()) {
111+
112+
if (wysiwyg && disabled) {
113+
wysiwyg.setEnabledStatus(false);
114+
wysiwyg.getPluginButtons().prop('disabled', 'disabled');
115+
} else if (wysiwyg) {
116+
wysiwyg.setEnabledStatus(true);
117+
wysiwyg.getPluginButtons().removeProp('disabled');
118+
}
115119
}
116120
}
117121
});

0 commit comments

Comments
 (0)