[dart:js] Use Array.isArray
Bug: b/411647888 Change-Id: I501808ab48798e99531114017ad3497d1f0ab2c4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423067 Reviewed-by: Srujan Gaddam <srujzs@google.com> Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
committed by
Commit Queue
parent
20e8977df2
commit
2f5dd77ccb
@@ -440,7 +440,7 @@ JsObject _wrapToDartHelper(Object o) {
|
||||
if (JS<bool>('!', 'typeof # == "function"', o)) {
|
||||
return JsFunction._fromJs(o);
|
||||
}
|
||||
if (JS<bool>('!', '# instanceof Array', o)) {
|
||||
if (JS<bool>('!', 'Array.isArray(#)', o)) {
|
||||
return JsArray._fromJs(o);
|
||||
}
|
||||
return JsObject._fromJs(o);
|
||||
|
||||
@@ -548,7 +548,7 @@ Object _wrapToDart(o) {
|
||||
(o) => JsFunction._fromJs(o),
|
||||
);
|
||||
}
|
||||
if (JS('bool', '# instanceof Array', o)) {
|
||||
if (JS('bool', 'Array.isArray(#)', o)) {
|
||||
return _getDartProxy(
|
||||
o,
|
||||
_DART_OBJECT_PROPERTY_NAME,
|
||||
|
||||
Reference in New Issue
Block a user