Symbol.iterator in Internet Explorer doesn't work
Question
When I add an Image, in this block:
for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var file = _step.value;
_loop(file);
}`
I get the error:
the object does not support the property or the 'jscomp_symbol_iterator0' method
It happens on IE 11. Is there an alternative to write that loop in another way, supported by IE?
Answers (3)
Hi @panagulis72,
Have you looked into using a polyfill? A quick google search found this...I've never used Symbol.iterator before, so that's probably as much as I'd be able to help :(
Hi @panagulis72, unfortunately, that piece of code is generated by the compiler from this method (is it intentional your use of embedAsBase64?) if you want to find a way to write it up without generating it I'd be glad to merge your PR
Hi @artf ! I'm talking about this file: https://raw.githubusercontent.com/artf/grapesjs/dev/dist/grapes.js
try to search the string:
` for (var _iterator = files[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)`
I'm talking about this loop
But I solved this issue replacing with this code:
` try {
for(var i = 0; i < files.length; i++){
var file = files[i];
_loop(file);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}`
I don't know if it is a good solution, but in Internet Explorer works fineRelated Questions and Answers
Continue research with similar issue discussions.
Issue #1364
[Bug]: Error on multiple instances of grapesjs
Hello, I use Grapesjs in my reactJS application. I have a react component which is an instance of Grapesjs. So I can add this component in...
Issue #1894
[BUG] Custom Trait documentation example doesn't work
Specifically this: https://grapesjs.com/docs/modules/Traits.html#define-new-trait-type First of all, the keyUp event references onChange wh...
Issue #1752
Add Image is not working in IE Browser
Uploading an image and adding to the template is working in Chrome but it is not working in IE browser. Please give me a solution how to fi...
Issue #969
[BUG] Video block - Loop option
Hello everyone, I noticed that when you drag and drop a video block to the canvas, choose youtube, add the correct video ID and check the l...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.