Fix issue deeply extract falsey values from context while executing JS bindings
This commit is contained in:
parent
b1e421651d
commit
4245430561
|
@ -19,7 +19,10 @@ const removeSquareBrackets = value => {
|
|||
const getContextValue = (path, context) => {
|
||||
let data = context
|
||||
path.split(".").forEach(key => {
|
||||
data = data[removeSquareBrackets(key)] || {}
|
||||
if (data == null || typeof data !== "object") {
|
||||
return null
|
||||
}
|
||||
data = data[removeSquareBrackets(key)]
|
||||
})
|
||||
return data
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue