appsmithorg / appsmithorg/appsmith

[Feature] Deep freeze properties that should not get updated before evaluation

Open
#3,136 1 comment 1 reaction 0 assignees View on GitHub
Enhancement Javascript Product JS Evaluation Low Query & JS Pod Query Widgets & IDE Pod
Dominant language
TypeScript
Stars
40.9k
Forks
4.8k
Avg merge
1d 22h
Merged PRs (30d)
45

Description

## Summary

Today I can add a binding like the following anywhere and cause data issues in my app.

```
Table1.tableData => {{ (()=>{ Api1.data = [{"hello": "world"}]; return Api1.data;})() }}
```

## Motivation

While the example above might look trivial, subtler versions like `.shift()` to get the first row (keys) from a google sheet can cause issues that would become really difficult for the user to debug later on.

Deep freezing will make sure that the user gets an error when they accidentally mutate an object that they're not supposed to.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.