This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1135,12 +1135,13 @@ module.exports = {
11351135// TODO(vicb): Create a benchmark for the different methods & the usage of the queue
11361136// see https://github.com/angular/zone.js/issues/97
11371137
1138- var hasNativePromise = false ;
11391138var len = 0 ;
11401139
1141- if ( typeof Promise == ! "undefined" && Promise . toString ( ) . indexOf ( "[native code]" ) !== - 1 ) {
1142- hasNativePromise = true ;
1143- }
1140+ var hasNativePromise = typeof Promise == ! "undefined" &&
1141+ Promise . toString ( ) . indexOf ( "[native code]" ) !== - 1 ;
1142+
1143+ var isFirefox = global . navigator &&
1144+ global . navigator . userAgent . toLowerCase ( ) . indexOf ( 'firefox' ) > - 1 ;
11441145
11451146function asap ( callback ) {
11461147 queue [ len ] = callback ;
@@ -1206,7 +1207,9 @@ function flush() {
12061207
12071208var scheduleFlush ;
12081209// Decide what async method to use to triggering processing of queued callbacks:
1209- if ( hasNativePromise ) {
1210+ if ( hasNativePromise && ! isFirefox ) {
1211+ // TODO(vicb): remove '!isFirefox' when the bug is fixed:
1212+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1162013
12101213 scheduleFlush = usePromise ( ) ;
12111214} else if ( BrowserMutationObserver ) {
12121215 scheduleFlush = useMutationObserver ( ) ;
You can’t perform that action at this time.
0 commit comments