Promise Polyfill for older browsers
authorColeman Watts <coleman@civicrm.org>
Thu, 4 Apr 2019 01:52:15 +0000 (21:52 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 4 Apr 2019 17:30:18 +0000 (13:30 -0400)
bower.json
templates/CRM/common/l10n.js.tpl

index e40429345d856401fef94a3cfb949329ad9531ca..b970b3e9ada7cdee86e1684673f56d0332942401 100644 (file)
@@ -31,7 +31,8 @@
     "angular-bootstrap": "^2.5.0",
     "angular-sanitize": "~1.5.0",
     "smartmenus": "~1.1",
-    "phantomjs-polyfill": "^0.0.2"
+    "phantomjs-polyfill": "^0.0.2",
+    "es6-promise": "^4.2.4"
   },
   "resolutions": {
     "angular": "~1.5.11"
index 27338c8dfc9aad4646a3ae781b37a197a4613a28..f2047652cc8a939367b8e7e55c99b289546d726e 100644 (file)
     params: {},
     functions: []
   };
+
+  // Load polyfill
+  if (!('Promise' in window)) {
+    CRM.loadScript(CRM.config.resourceBase + 'bower_components/es6-promise/es6-promise.auto.min.js');
+  }
+
 })(jQuery);
 {/literal}