Replies: 1 comment 1 reply
-
I'm trying to think of a case where this would cause potential problems, but I can't off the top of my head. I do wonder if a warning would be a good first step to see if it causes any issues before throwing an actual exception? Any chance you want to throw together a PR for me to look at? :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
By creating non-existing Unicorn models and misusing the updated() method for saving their values, I came across the idea: why doesn't Unicorn raise an Exception if the frontend tries to update a value of a model=property that does not exist on the backend?
Given an input that has a
unicorn:model="email"
attr, and the following backend component:... nothing happens in the backend, if you change the input value by typing. It clearly contains a bug, notably a typo - in the fronend,
email
is used, the backend usesmail
as variable name.This is something where you can sit for a long time and search for the error...
What yould you say if Unicorn would raise an Exception in
set_property_value
, at the end of theif
tree instead ofbreak
?Something like
Beta Was this translation helpful? Give feedback.
All reactions