File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 178
178
/**
179
179
* Waits for all supplied jQuery promises and
180
180
* increases the progress as the promises resolve.
181
- *
181
+ *
182
182
* @param $promise jQUery Promise
183
183
*/
184
184
( function ( ) {
185
185
var initial = 0 , current = 0 ;
186
-
186
+
187
187
NProgress . promise = function ( $promise ) {
188
- if ( ! $promise || $promise . state ( ) == "resolved" ) {
188
+ if ( ! $promise || $promise . state ( ) === "resolved" ) {
189
189
return this ;
190
190
}
191
-
192
- if ( current == 0 ) {
191
+
192
+ if ( current === 0 ) {
193
193
NProgress . start ( ) ;
194
194
}
195
-
195
+
196
196
initial ++ ;
197
197
current ++ ;
198
-
198
+
199
199
$promise . always ( function ( ) {
200
200
current -- ;
201
- if ( current == 0 ) {
201
+ if ( current === 0 ) {
202
202
initial = 0 ;
203
203
NProgress . done ( ) ;
204
204
} else {
205
205
NProgress . set ( ( initial - current ) / initial ) ;
206
206
}
207
207
} ) ;
208
-
208
+
209
209
return this ;
210
210
} ;
211
-
211
+
212
212
} ) ( ) ;
213
213
214
214
/**
You can’t perform that action at this time.
0 commit comments