summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2017-05-03 12:01:47 +0200
committerChristophe Matthieu <chm@odoo.com>2017-05-04 17:19:25 +0200
commit5dd23f7de22cb6302f701d7fa8e7afffc52686f0 (patch)
treef75c75f167d6352bb9b1020f2bf7416df5a54b10
parent9500f8d3f77d0e3e5bb392d2991ccb7af81f1bae (diff)
[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)
-rw-r--r--addons/web_editor/static/lib/summernote/src/js/EventHandler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/lib/summernote/src/js/EventHandler.js b/addons/web_editor/static/lib/summernote/src/js/EventHandler.js
index 09a7b00082a..9701b8728d2 100644
--- a/addons/web_editor/static/lib/summernote/src/js/EventHandler.js
+++ b/addons/web_editor/static/lib/summernote/src/js/EventHandler.js
@@ -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);
}