You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I understand it, in this code, square brackets after the object are being used to dynamically compute a property name based on the type of data that the val variable holds. So if val is a string, it would return the value associated with the string property in the object.
However, if the val variable holds an array, JavaScript's typeof would return 'object', not 'array'.
For this reason, the code inside the array property of this object may not be reachable. It might be worth further testing to ensure there is no missing functionality here.
The text was updated successfully, but these errors were encountered:
While refactoring to TypeScript (#456), I noticed the property "array" is added in the following code snippet (Ln 153):
react-json-schema-form-builder/src/formBuilder/dependencies/ValueSelector.js
Lines 107 to 209 in 58ed4fc
As I understand it, in this code, square brackets after the object are being used to dynamically compute a property name based on the type of data that the
val
variable holds. So ifval
is a string, it would return the value associated with thestring
property in the object.However, if the
val
variable holds an array, JavaScript'stypeof
would return'object'
, not'array'
.For this reason, the code inside the
array
property of this object may not be reachable. It might be worth further testing to ensure there is no missing functionality here.The text was updated successfully, but these errors were encountered: