[FIX] web_editor: prevent crash when publishing a payment in edit mode

When updateStyleInfo is called, the options is not necessarily on
editable area (eg: when update the toolbar for image)
This commit is contained in:
Christophe Matthieu
2017-05-04 17:19:25 +02:00
parent 9500f8d3f7
commit 5dd23f7de2
@@ -191,7 +191,7 @@ define([
if (!styleInfo) {
return;
}
var isAirMode = layoutInfo.editor().data('options').airMode;
var isAirMode = (layoutInfo.editor().data('options') || {}).airMode;
if (!isAirMode) {
modules.toolbar.update(layoutInfo.toolbar(), styleInfo);
}