From eed7fdb6fe18e07bbf1f76a7418c05eb90afb40e Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Wed, 22 Jun 2016 18:00:03 +0200 Subject: [PATCH] [REF] web_editor: `cancel` method of RTE should be async and return its deferred. This commit makes the behavior consistent with the `save` method. --- addons/web_editor/static/src/js/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }