raphaelameaume / fragment

[alpha] A web development environment for creative coding
https://fragment.tools
MIT License
828 stars 19 forks source link

Prevent error when field value is null #114

Closed raphaelameaume closed 6 months ago

raphaelameaume commented 6 months ago

This PR fixes an issue when trying to keep track of value changes in Field.

If the initial or current value is null, the type would be object, leading to a TypeError when trying to diff changes in hasChanged().

Checking initialValue and currentValue first fixes the error.