# UNSAFE_GLOBAL_ACCESS: Computed access to a global object

> Computed access to a global object

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

## What it means

The component reads a property of window, globalThis, self, document or a function by a name computed at run time (window[name]), or passes the global object, document or the runtime's Preact module around as a value (to a function, in an object or array, returned), so the build cannot tell which global it reaches, such as eval or document.cookie (rule dynamic-global-access).

## How to fix

Name the global directly (window.innerWidth) or keep your own object with the values you need.
