fix ie11-polyfill so Promise.all works in IE11
fixes: CNVS-33769 the file we were building with core-js was not including an array iterator polyfill so if you were using this polyfill in IE 11 and did `Promise.all([1,2])` it would fail saying ‘1,2 is not iterable!’ test plan: in IE11, load a page in canvas open the developer tools and type: Promise.all([1,2]).then(function(o,t){console.log(‘it worked’, o, t)}) it should log: “it worked 1 2” and not throw an error Change-Id: I49a6cd439c151b7703d77a7400856f438937443d Reviewed-on: https://gerrit.instructure.com/97219 Tested-by: Jenkins Reviewed-by: John Corrigan <jcorrigan@instructure.com> QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
parent
a47fa57810
commit
612637531a
File diff suppressed because one or more lines are too long
|
@ -6,12 +6,9 @@ const FEATURES_TO_POLYFILL=[
|
|||
'es6.promise',
|
||||
'es6.object.assign',
|
||||
'es6.object.is',
|
||||
'es6.array.from',
|
||||
'es6.array.of',
|
||||
'es6.array.find',
|
||||
'es6.array.find-index',
|
||||
'es6.array',
|
||||
'es7.array.includes',
|
||||
'es6.function.name',
|
||||
'es6.function',
|
||||
'es6.string.ends-with',
|
||||
'es6.string.includes',
|
||||
'es6.string.starts-with',
|
||||
|
@ -27,6 +24,6 @@ coreJsBuilder({
|
|||
umd: false
|
||||
}).then(code => {
|
||||
const minifedCode = UglifyJS.minify(code, {fromString: true, warnings: true}).code
|
||||
const contents = '//THIS FILE WAS AUTOGENERATED BY script/make-ie11-shim.js\n' + minifedCode
|
||||
const contents = '//THIS FILE WAS AUTOGENERATED BY script/make-ie11-polyfill.js\n' + minifedCode
|
||||
fs.writeFile(OUTPUT_FILE, contents)
|
||||
}).catch(console.error)
|
||||
}).catch(console.error)
|
Loading…
Reference in New Issue