Skip to content

Commit 8678711

Browse files
fishythefishCommit Queue
authored andcommitted
[js_shared] Remove feature detection for Promise.
MDN says Promise has been widely available across browsers since 2015, so there should be no need to perform this extra check. Change-Id: I6a6a69642997f15cd97e5be0cec0974d6dcef5ee Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450262 Reviewed-by: Srujan Gaddam <[email protected]> Commit-Queue: Mayank Patke <[email protected]>
1 parent 68f0d0e commit 8678711

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sdk/lib/_internal/js_shared/lib/js_util_patch.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ bool isJavaScriptSimpleObject(value) {
620620
JS('bool', '# === null', proto);
621621
}
622622

623-
bool _isJavaScriptPromise(value) =>
624-
JS('bool', r'typeof Promise != "undefined" && # instanceof Promise', value);
623+
bool _isJavaScriptPromise(value) => JS('bool', r'# instanceof Promise', value);
625624

626625
DateTime _dateToDateTime(date) {
627626
int millisSinceEpoch = JS('int', '#.getTime()', date);

0 commit comments

Comments
 (0)