Fix js test for firefox now that null becomes 'null' and not 'undefined'
R=sra@google.com Review URL: https://codereview.chromium.org//438503003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38821 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -455,7 +455,8 @@ class JsArray<E> extends JsObject with ListMixin<E> {
|
||||
}
|
||||
|
||||
void sort([int compare(E a, E b)]) {
|
||||
callMethod('sort', [compare]);
|
||||
// Note: arr.sort(null) is a type error in FF
|
||||
callMethod('sort', compare == null ? [] : [compare]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user