Skip to content

Commit 2f5dd77

Browse files
rakudramaCommit Queue
authored andcommitted
[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 <[email protected]> Commit-Queue: Stephen Adams <[email protected]>
1 parent 20e8977 commit 2f5dd77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ JsObject _wrapToDartHelper(Object o) {
440440
if (JS<bool>('!', 'typeof # == "function"', o)) {
441441
return JsFunction._fromJs(o);
442442
}
443-
if (JS<bool>('!', '# instanceof Array', o)) {
443+
if (JS<bool>('!', 'Array.isArray(#)', o)) {
444444
return JsArray._fromJs(o);
445445
}
446446
return JsObject._fromJs(o);

sdk/lib/_internal/js_runtime/lib/js_patch.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ Object _wrapToDart(o) {
548548
(o) => JsFunction._fromJs(o),
549549
);
550550
}
551-
if (JS('bool', '# instanceof Array', o)) {
551+
if (JS('bool', 'Array.isArray(#)', o)) {
552552
return _getDartProxy(
553553
o,
554554
_DART_OBJECT_PROPERTY_NAME,

0 commit comments

Comments
 (0)