Open lleadbet opened 1 year ago
This is working as designed on the basis that it is an error to try and access a missing header.
It may be better to have a missing header return ()
(not an empty string),but if we change this now it will break existing scripts and would thus be an incompatible change.
I'm going to label this with the new 2.0
label.
Describe the bug Accessing an attribute in a Set/ValueMap in Rhai that doesn't exist causes the script to error unexpectedly.
To Reproduce Given this script:
Will cause an error such as:
You can work around this by using:
However this is far less readable as it expects an error on reading the header.
Expected behavior Ideally, a missing header would simply return an empty string.
Desktop (please complete the following information):