From 6d40fedc21df1494731e59629948115687ddcc69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 24 Oct 2019 19:10:36 +0200 Subject: [PATCH] Manage rejected user warning promise If the user select the option No, the promise is rejected so we must reject the rpc call. issue8645 review274071002 --- src/rpc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc.js b/src/rpc.js index aa27e36561..da02000b7d 100644 --- a/src/rpc.js +++ b/src/rpc.js @@ -42,7 +42,7 @@ msg = data.error[1][1]; description = data.error[1][2]; Sao.common.userwarning.run(msg, description) - .done(function(result) { + .then(function(result) { if (!~['always', 'ok'].indexOf(result)) { dfd.reject(); return; @@ -58,7 +58,7 @@ Sao.rpc(args, session).then( dfd.resolve, dfd.reject); }); - }); + }, dfd.reject); return; } else if (data.error[0] == 'UserError') { msg = data.error[1][0];