diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-10-05 11:18:31 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-10-06 10:44:37 +0200 |
| commit | e047130314a9c06c2bbb43ffe2e1c4514f856d89 (patch) | |
| tree | 6c0f210919c1a1a6947d4432db5720d6a67711c1 /addons/web_editor/static/src/js | |
| parent | afa361f86e9d55d060021ccee1e258fe49667ce6 (diff) | |
[FIX] web_editor: oStyle.range can be undefined
On initialisation summernote call update method with oStyle.range is undefined.
The range can be undefined because the update is call before any selection and attach method from summernote call the update without range.
The method summernote_table_update try to use the range and raise an exception.
fix: Check if oStyle.range exits.
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/summernote.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js index 569d769f801..eda0e33cf5f 100644 --- a/addons/web_editor/static/src/js/summernote.js +++ b/addons/web_editor/static/src/js/summernote.js @@ -2170,7 +2170,7 @@ function summernote_table_scroll (event) { } function summernote_table_update (oStyle) { var r = range.create(); - if (!r || !r.isOnCell() || !r.isOnCellFirst()) { + if (!oStyle.range || !r || !r.isOnCell() || !r.isOnCellFirst()) { $('.o_table_handler').remove(); return; } |
