# UNSAFE_EVAL: eval in the component

> eval in the component

> Esta página ainda não tem tradução para o português; este é o texto em inglês. (This page is not translated yet: the English text follows.)

| Severity | Fault                         | Stage        |
| -------- | ----------------------------- | ------------ |
| error    | customer (the source package) | build output |

## What it means

The component calls or references eval, which runs a string as code in the host page. Whoever controls the string (an attribute of the page, an API answer, what the visitor types) runs code with the page's privileges, so the static security check refuses it (rule eval).

## How to fix

Remove eval: parse data with JSON.parse, compute with ordinary functions, and map the cases you need to functions in an object.
