From 9b28fe25ec7da23e5c1e75499e2984e3019289f2 Mon Sep 17 00:00:00 2001 From: Carlos Lizaga Date: Thu, 23 Nov 2017 18:13:38 +0100 Subject: [PATCH] that - this consistency and splat complete function to be Jasmine friendly. --- lib/web/mage/collapsible.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/web/mage/collapsible.js b/lib/web/mage/collapsible.js index 49624fbeb159a..267734605f141 100644 --- a/lib/web/mage/collapsible.js +++ b/lib/web/mage/collapsible.js @@ -519,7 +519,7 @@ define([ that = this; if (url) { - this.xhr = $.get({ + that.xhr = $.get({ url: url, dataType: 'html' }, function () { @@ -535,7 +535,8 @@ define([ setTimeout(function () { that.content.html(response); }, 1); - }).complete(function (jqXHR, status) { + }); + that.xhr.complete(function (jqXHR, status) { setTimeout(function () { if (status === 'abort') { that.content.stop(false, true);