Skip to content

Remove usage of eval in MarkerUtils #10615

@MV88

Description

@MV88

Description

We can get rid of this eval

const loadGlyphs = (font) => {
const fontJSON = cssJSON[font];
return Object.keys(fontJSON).reduce((acc, key) => {
return {
...acc,
[key]: eval("'\\u" + fontJSON[key] + "'") // eslint-disable-line
};
}, {});
};

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions