You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by lu...@apache.org on 2019/07/15 06:42:16 UTC

[incubator-weex] branch master updated: [jsfm] Also enable the promise polyfill on Android (#2704)

This is an automated email from the ASF dual-hosted git repository.

luckychen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new eae533c  [jsfm] Also enable the promise polyfill on Android (#2704)
eae533c is described below

commit eae533c5a07755c7040efff10fa51e122d997715
Author: Hanks <zh...@gmail.com>
AuthorDate: Mon Jul 15 14:42:11 2019 +0800

    [jsfm] Also enable the promise polyfill on Android (#2704)
    
    Since the internal Promise API may have unpredictable behavior on some
    legacy Android devices, so using the js polyfill instead (as iOS does).
    
    Modify the js framework version in package.json, since it has already
    been updated in https://github.com/apache/incubator-weex/pull/2669
---
 package.json                       | 2 +-
 runtime/shared/polyfill/promise.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index 48b5222..80cccf9 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "name": "weex",
   "version": "0.12.2",
   "subversion": {
-    "framework": "0.29.6",
+    "framework": "0.29.7",
     "transformer": ">=0.1.5 <0.5"
   },
   "description": "A framework for building Mobile cross-platform UI",
diff --git a/runtime/shared/polyfill/promise.js b/runtime/shared/polyfill/promise.js
index 1bb0ee3..51fca79 100644
--- a/runtime/shared/polyfill/promise.js
+++ b/runtime/shared/polyfill/promise.js
@@ -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
 }