@@ -645,6 +645,7 @@ export function newScope (fn, props, a1, a2) {
645
645
var globalEnv = globalPSD . env ;
646
646
psd . env = patchGlobalPromise ? {
647
647
Promise : Promise , // Changing window.Promise could be omitted for Chrome and Edge, where IDB+Promise plays well!
648
+ PromiseProp : { value : Promise , configurable : true , writable : true } ,
648
649
all : Promise . all ,
649
650
race : Promise . race ,
650
651
resolve : Promise . resolve ,
@@ -744,7 +745,7 @@ function switchToZone (targetZone, bEnteringZone) {
744
745
// Leaving or entering global zone. It's time to patch / restore global Promise.
745
746
746
747
// Set this Promise to window.Promise so that transiled async functions will work on Firefox, Safari and IE, as well as with Zonejs and angular.
747
- _global . Promise = targetEnv . Promise ;
748
+ Object . defineProperty ( _global , ' Promise' , targetEnv . PromiseProp ) ;
748
749
749
750
// Support Promise.all() etc to work indexedDB-safe also when people are including es6-promise as a module (they might
750
751
// not be accessing global.Promise but a local reference to it)
@@ -760,6 +761,7 @@ function snapShot () {
760
761
var GlobalPromise = _global . Promise ;
761
762
return patchGlobalPromise ? {
762
763
Promise : GlobalPromise ,
764
+ PromiseProp : Object . getOwnPropertyDescriptor ( _global , "Promise" ) ,
763
765
all : GlobalPromise . all ,
764
766
race : GlobalPromise . race ,
765
767
resolve : GlobalPromise . resolve ,
0 commit comments