UNSAFE_FUNCTION_CONSTRUCTOR: Function constructor in the component
Este conteúdo não está disponível em sua língua ainda.
| Severity | Fault | Stage |
|---|---|---|
| error | customer (the source package) | build output |
What it means
Section titled “What it means”The component builds a function from a string (new Function, Function(…), or the constructor of a function reached through .constructor), which is eval under another name: the string runs as code in the host page (rule new-function).
How to fix
Section titled “How to fix”Write the function in the source instead of building it from text; for formulas, parse them into a small expression tree and evaluate that.