Skip to content
Snippets Groups Projects
Commit 8fbe992e authored by Aleksey Shvayka's avatar Aleksey Shvayka Committed by Tom Care
Browse files

Fix operator precedence (#754)

Unlike PHP, in JavaScript ! has higher precedence than instanceof, thus !smth instanceof TypeError will never (unless @@hasInstance is defined) be true.
parent 29c23844
No related branches found
No related tags found
No related merge requests found
...@@ -233,7 +233,7 @@ p.then(function () { ...@@ -233,7 +233,7 @@ p.then(function () {
return "Expected exception to be thrown"; return "Expected exception to be thrown";
}).then($DONE, function (e) { }).then($DONE, function (e) {
if (!e instanceof TypeError) { if (!(e instanceof TypeError)) {
$ERROR("Expected TypeError but got " + e); $ERROR("Expected TypeError but got " + e);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment