mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🐛 fix editor image uploads in Edge (#687)
no issue - babel's transpilation of the `for...of` loops was resulting in an error in MS Edge, dropping back to an old `for` loop fixed it
This commit is contained in:
parent
e1b4ccd8d4
commit
ecbe84025f
1 changed files with 8 additions and 3 deletions
|
@ -106,7 +106,10 @@ export default Component.extend({
|
|||
let ok = [];
|
||||
let errors = [];
|
||||
|
||||
for (let file of files) {
|
||||
// NOTE: for...of loop results in a transpilation that errors in Edge,
|
||||
// once we drop IE11 support we should be able to use native for...of
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let file = files[i];
|
||||
let result = validate(file);
|
||||
if (result === true) {
|
||||
ok.push(file);
|
||||
|
@ -147,8 +150,10 @@ export default Component.extend({
|
|||
|
||||
this.onStart();
|
||||
|
||||
for (let file of files) {
|
||||
uploads.push(this.get('_uploadFile').perform(file));
|
||||
// NOTE: for...of loop results in a transpilation that errors in Edge,
|
||||
// once we drop IE11 support we should be able to use native for...of
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
uploads.push(this.get('_uploadFile').perform(files[i]));
|
||||
}
|
||||
|
||||
// populates this.errors and this.uploadUrls
|
||||
|
|
Loading…
Add table
Reference in a new issue