From 405c4e29543822330f24cbd293f7a9e4eca4e29d Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 15 Jun 2016 09:53:50 +0200 Subject: [PATCH] Return a rejected promise when registering an icon with no value This makes the done callbacks to not be called so the src field of the image is not set which is better than setting an empty value as the browser renders it as a not found image when it can not found the image issue5639 review29291002 --- src/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.js b/src/common.js index 214ace4189..b369dc1630 100644 --- a/src/common.js +++ b/src/common.js @@ -2468,7 +2468,7 @@ }, register_icon: function(icon_name) { if (!icon_name) { - return jQuery.when(''); + return jQuery.Deferred().reject(); } else if ((icon_name in this.loaded_icons) || ~Sao.common.LOCAL_ICONS.indexOf(icon_name)) { return jQuery.when(this.get_icon_url(icon_name));