Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit f4657a4

Browse files
committed
Correcting check method, because it was the wrong logic
1 parent 8131bc8 commit f4657a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commands/waitForUrl.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ WaitForUrl.prototype.check = function() {
5757

5858
this.protocol.url(function(result) {
5959
var now = new Date().getTime();
60-
61-
if (result.status === 0 && result.value !== self.url) {
60+
61+
if (result.status === 0 && result.value === self.url) {
6262
setTimeout(function() {
6363
var msg = self.messages.success + (now - self.startTimer) + ' milliseconds.';
6464
self.cb.call(self.client.api, result.value);
6565
self.client.assertion(true, !!result.value, false, msg, true);
6666
return self.emit('complete');
6767
}, self.timeout);
68-
} else if (now - self.startTimer < self.ms && result.value == self.url) {
68+
} else if (now - self.startTimer < self.ms) {
6969
setTimeout(function() {
7070
self.check();
7171
}, 500);

0 commit comments

Comments
 (0)