summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2016-06-22 18:00:03 +0200
committerSimon Lejeune <sle@openerp.com>2016-07-05 17:44:56 +0200
commiteed7fdb6fe18e07bbf1f76a7418c05eb90afb40e (patch)
tree894c06a18bb94d6234627915260418cd738649f0
parent5c54571f4ea0b262c9a3c882c0e29c344eb36d6a (diff)
[REF] web_editor: `cancel` method of RTE should be async
and return its deferred. This commit makes the behavior consistent with the `save` method.
-rw-r--r--addons/web_editor/static/src/js/editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/editor.js b/addons/web_editor/static/src/js/editor.js
index 9dd08c3abd5..1163635146f 100644
--- a/addons/web_editor/static/src/js/editor.js
+++ b/addons/web_editor/static/src/js/editor.js
@@ -130,7 +130,7 @@ editor.Class = Widget.extend({
return this.rte.save();
},
cancel: function () {
- new $.Deferred(function (d) {
+ return new $.Deferred(function (d) {
if (!rte.history.getEditableHasUndo().length) {
return d.resolve();
}