Skip to content

Commit 1c00a45

Browse files
author
Denys Rul
committed
MAGETWO-45701: [JS] RequireJS resolver (for Loader widget)
- Apply resolver on checkout steps
1 parent 06987f8 commit 1c00a45

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

app/code/Magento/Checkout/view/frontend/web/js/model/full-screen-loader.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
*/
55
/*jshint browser:true jquery:true*/
66
/*global alert*/
7-
define(
8-
['jquery'],
9-
function ($) {
7+
define([
8+
'jquery',
9+
'rjsResolver'
10+
], function ($, resolver) {
1011
'use strict';
1112

1213
var containerId = '#checkout';
@@ -22,9 +23,14 @@ define(
2223

2324
/**
2425
* Stop full page loader action
26+
*
27+
* @param {Boolean} forceStop
2528
*/
26-
stopLoader: function () {
27-
$(containerId).trigger('processStop');
29+
stopLoader: function (forceStop) {
30+
var $elem = $(containerId),
31+
stop = $elem.trigger.bind($elem, 'processStop');
32+
33+
forceStop ? stop() : resolver(stop);
2834
}
2935
};
3036
}

0 commit comments

Comments
 (0)