Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[jsfm] Also enable the promise polyfill on Android
Browse files Browse the repository at this point in the history
Since the internal Promise API may have unpredictable behavior on some
legacy Android devices, so using the js polyfill instead (as iOS does).
  • Loading branch information
Hanks10100 committed Jul 15, 2019
1 parent 05c6758 commit d859fee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/shared/polyfill/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const { WXEnvironment } = global

/* istanbul ignore next */
if (typeof WXEnvironment !== 'undefined'
&& WXEnvironment.platform === 'iOS'
&& (WXEnvironment.platform === 'iOS' || WXEnvironment.platform === 'android')
&& !WXEnvironment.__enable_native_promise__) {
global.Promise = undefined
}

0 comments on commit d859fee

Please sign in to comment.