Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "can't modify frozen array" exception under certain conditions #2999

Merged
merged 3 commits into from May 3, 2018

Conversation

glebtv
Copy link
Contributor

@glebtv glebtv commented Mar 7, 2018

This fixes "can't modify frozen array" exception which occurs for me in development in many real-world apps.

It happens when @_fields is returned from HasFields#fields and then it is being frozen when assigning it to @_ro_fields.

The spec included is as close as I could get it to my use-case (real app does not need to add a new field type, any change to code that causes my app to reload triggers this exception)

@fmh
Copy link
Contributor

fmh commented Mar 8, 2018

👍

@mshibuya mshibuya merged commit 37aa038 into railsadminteam:master May 3, 2018
@mshibuya
Copy link
Member

mshibuya commented May 3, 2018

Looks good, thanks!

@AnatolyShirykalov AnatolyShirykalov mentioned this pull request Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants