Skip to content

Commit

Permalink
Fix dart.equals("10", 10) (issue #210)
Browse files Browse the repository at this point in the history
See doc on == vs. === : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators
Note that the `== null` tests in the same function are probably preferable to `=== null` if both undefined and null values can be encountered.
  • Loading branch information
ochafik committed Jun 10, 2015
1 parent 321be0a commit d159b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/dev_compiler/lib/runtime/dart_runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ var dart, dartx;
function equals(x, y) {
if (x == null || y == null) return x == y;
let eq = x['=='];
return eq ? eq.call(x, y) : x == y;
return eq ? eq.call(x, y) : x === y;
}
dart.equals = equals;

Expand Down

0 comments on commit d159b6e

Please sign in to comment.