File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
app/code/Magento/Ui/view/base/web/js/lib Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,6 @@ define([
81
81
} ) ;
82
82
}
83
83
84
-
85
84
return source ;
86
85
} else if ( template . nodeType === 1 || template . nodeType === 8 ) {
87
86
source = new ko . templateSources . anonymousTemplate ( template ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ define([], function () {
17
17
/**
18
18
* Method for logging asynchronous operations
19
19
* @param {Promise } promise
20
- * @param {object } config
20
+ * @param {Object } config
21
21
*/
22
22
LogUtils . prototype . asyncLog = function ( promise , config ) {
23
23
var levels ,
@@ -29,11 +29,10 @@ define([], function () {
29
29
messages = config . messages || this . createMessages ( ) ;
30
30
wait = config . wait || 5000 ;
31
31
32
-
33
32
this . logger [ levels . requested ] ( messages . requested , config . data ) ;
34
33
setTimeout ( function ( ) {
35
34
promise . state ( ) === 'pending' ?
36
- this . logger [ levels . failed ] ( messages . failed , config . data ) :
35
+ this . logger [ levels . failed ] ( messages . failed , config . data ) :
37
36
this . logger [ levels . loaded ] ( messages . loaded , config . data ) ;
38
37
} . bind ( this ) , wait )
39
38
} ;
Original file line number Diff line number Diff line change @@ -100,16 +100,23 @@ define(['module'], function (module) {
100
100
}
101
101
}
102
102
103
+ /**
104
+ * @override
105
+ *
106
+ * @param {Event } evt
107
+ */
103
108
xhr . onreadystatechange = function ( evt ) {
104
109
var status , err ;
105
110
//Do not explicitly handle errors, those should be
106
111
//visible via console output in the browser.
107
112
if ( xhr . readyState === 4 ) {
108
113
status = xhr . status || 0 ;
114
+
109
115
if ( status > 399 && status < 600 ) {
110
116
//An http 4xx or 5xx error. Signal an error.
111
117
err = new Error ( url + ' HTTP status: ' + status ) ;
112
118
err . xhr = xhr ;
119
+
113
120
if ( fail ) {
114
121
fail ( err ) ;
115
122
}
You can’t perform that action at this time.
0 commit comments