Issue #2661Opened March 16, 2020by h3llomoto0 reactions

[BUG] toggleStateCls returns js error

Question

Hi there, guys. I found a bug at the LayerManager: I've got an html comment as a layer in the LM. I click the comment. I get an error at the console:

Uncaught TypeError: Cannot read property 'remove' of undefined

And the code this error relates to is: src/style_manager/view/SectorsView.js:47

  toggleStateCls(targets = [], enable) {
    targets.forEach(trg => {
      const el = trg.getEl();
      el && el.classList[enable ? 'add' : 'remove'](helperCls);
    });
  },

So, html comments cant have classList property and this is the bug.

Answers (2)

artfMarch 19, 20200 reactions

Can you create a live demo, please? By default definition, you shouldn't be able to see Comment component in Layers

no-response[bot]March 29, 20200 reactions

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.