From bd88240d3fc981913a81f193882afc2e7c86bc2a Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Wed, 6 Mar 2019 14:02:36 +0100 Subject: [PATCH] [REF] website_livechat: adapt code after jQuery update Part of task 1896658 Co-authored-by: Aaron Bohy Co-authored-by: Christophe Matthieu Co-authored-by: Mathieu Duckerts-Antoine Co-authored-by: David Monjoie Co-authored-by: Martin Geubelle Co-authored-by: svs-odoo Co-authored-by: Vincent Schippefilt --- .../static/src/js/website_livechat.editor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/website_livechat/static/src/js/website_livechat.editor.js b/addons/website_livechat/static/src/js/website_livechat.editor.js index 2ec5bc2a793..288f2af0e97 100644 --- a/addons/website_livechat/static/src/js/website_livechat.editor.js +++ b/addons/website_livechat/static/src/js/website_livechat.editor.js @@ -21,14 +21,15 @@ WebsiteNewMenu.include({ * and redirects the user to this new channel. * * @private - * @returns {Deferred} Unresolved if there is a redirection + * @returns {Promise} Unresolved if there is a redirection */ _createNewChannel: function () { var self = this; return wUtils.prompt({ window_title: _t("New Channel"), input: _t("Name"), - }).then(function (name) { + }).then(function (result) { + var name = result.val; if (!name) { return; } @@ -41,7 +42,7 @@ WebsiteNewMenu.include({ }, }).then(function (url) { window.location.href = url; - return $.Deferred(); + return new Promise(function () {}); }); }); },