Description
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 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.