-
-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
es6-promise
for an IE11 Promise polyfill.
This ensures that we support environments without a native `Promise` but still avoid using the manually configured `Ember.RSVP` runloop integration.
- Loading branch information
Showing
6 changed files
with
2,603 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,9 @@ const HAS_PROMISE = typeof Promise === 'function'; | |
|
||
import RSVP from 'rsvp'; | ||
import { run } from '@ember/runloop'; | ||
import { Promise as PromisePolyfill } from 'es6-promise'; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rwjblue
Author
Member
|
||
|
||
const _Promise: typeof Promise = HAS_PROMISE | ||
? Promise | ||
: (() => { | ||
// FIXME: this needs to work on IE11 | ||
throw new Error('Missing global Promise!'); | ||
})(); | ||
const _Promise: typeof Promise = HAS_PROMISE ? Promise : (PromisePolyfill as typeof Promise); | ||
|
||
export { _Promise as Promise }; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
@rwjblue fyi this line change now causes a 1.1k lines of JS added to test bundles and additional build overhead.
I'm aware its probably intentional, just wanted to give a heads up, I saw somewhere there is an initiative to drop support for ie11 in future, the earlier we do it, better I think 😄