BUG: Don't loop over objects with a for in loop
Question
Version: 0.16.22
Are you able to reproduce the bug from the demo?
[-] Yes [ ] No
What is the expected behavior?
Looping over objects should be done using Object.keys.forEach..., and not with a for-in loop.
Looping over objects with a for in loop will include properties that are inherited through the prototype chain. This behavior can lead to unexpected items in your for loop. More details can be found here.
Are you able to attach screenshots, screencasts or a live demo?
[ ] Yes (attach) [-] No
Answers (1)
This caused a bug in our application since we are using some package that adds properties to the object prototype. When trying to initialize a grapes.js editor we get an error in the console.

Related Questions and Answers
Continue research with similar issue discussions.
Issue #3065
BUG: gjs-hovered is not being removed when cursor leaves the layers
Version: 0.16.22 Are you able to reproduce the bug from the demo? [x] Yes [ ] No What is the expected behavior?Hover over body in the layer...
Issue #2916
[Bug]: Text component content not retrieved properly when using custom RTE
Version: 0.16.12 Are you able to reproduce the bug from the demo ? [ ] Yes [x] No (it does not include a custom RTE) What is the expected b...
Issue #3622
BUG: I18n functionality
Version: latest Are you able to reproduce the bug from the demo?[] Yes[ ] No What is the expected behavior? to editor.I18n.setLocale("es")...
Issue #3009
BUG: Restricting Drop on Wrapper Component
Version: 0.16.22 Are you able to reproduce the bug from the demo? [ ] Yes [ X] No - requires editing js. What is the expected behavior? wra...
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.