Skip to content

Commit c0e0382

Browse files
committed
Merge pull request #53 from drodil/fixEquals
Fix equals checks
2 parents 590e546 + ffa07fa commit c0e0382

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

nprogress.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,37 +178,37 @@
178178
/**
179179
* Waits for all supplied jQuery promises and
180180
* increases the progress as the promises resolve.
181-
*
181+
*
182182
* @param $promise jQUery Promise
183183
*/
184184
(function() {
185185
var initial = 0, current = 0;
186-
186+
187187
NProgress.promise = function($promise) {
188-
if (!$promise || $promise.state() == "resolved") {
188+
if (!$promise || $promise.state() === "resolved") {
189189
return this;
190190
}
191-
192-
if (current == 0) {
191+
192+
if (current === 0) {
193193
NProgress.start();
194194
}
195-
195+
196196
initial++;
197197
current++;
198-
198+
199199
$promise.always(function() {
200200
current--;
201-
if (current == 0) {
201+
if (current === 0) {
202202
initial = 0;
203203
NProgress.done();
204204
} else {
205205
NProgress.set((initial - current) / initial);
206206
}
207207
});
208-
208+
209209
return this;
210210
};
211-
211+
212212
})();
213213

214214
/**

0 commit comments

Comments
 (0)