Chromium Code Reviews| Index: dart/frog/leg/lib/js_helper.dart |
| diff --git a/dart/frog/leg/lib/js_helper.dart b/dart/frog/leg/lib/js_helper.dart |
| index 412a7d3e9c0b0c50d2a5911184a8466ea0433bf7..525d29fbe1216648fa154098b9cc9bf9358da146 100644 |
| --- a/dart/frog/leg/lib/js_helper.dart |
| +++ b/dart/frog/leg/lib/js_helper.dart |
| @@ -27,7 +27,7 @@ bool checkNumbers(var a, var b, var message) { |
| bool isJSArray(var value) { |
| - return JS("bool", @"$0.constructor === Array", value); |
| + return value !== null && JS("bool", @"$0.constructor === Array", value); |
|
ngeoffray
2012/02/21 12:23:51
No need.
|
| } |
| @@ -960,7 +960,7 @@ builtin$contains$2(receiver, other, startIndex) { |
| if (other is !String) { |
| throw 'String.contains with non-String is not implemented'; |
| } |
| - if ((startIndex !== null) || (startIndex is !num)) { |
| + if ((startIndex !== null) && (startIndex is !num)) { |
| throw new IllegalArgumentException(startIndex); |
| } |
| return receiver.indexOf(other, startIndex) >= 0; |