Hide state bindings if feature is not available
This commit is contained in:
parent
04a26f3344
commit
bf8975ec6d
|
@ -266,13 +266,17 @@ const getDeviceBindings = () => {
|
|||
* Gets all state bindings that are globally available.
|
||||
*/
|
||||
const getStateBindings = () => {
|
||||
let bindings = []
|
||||
if (get(store).clientFeatures?.state) {
|
||||
const safeState = makePropSafe("state")
|
||||
return getAllStateVariables().map(key => ({
|
||||
bindings = getAllStateVariables().map(key => ({
|
||||
type: "context",
|
||||
runtimeBinding: `${safeState}.${makePropSafe(key)}`,
|
||||
readableBinding: `State.${key}`,
|
||||
}))
|
||||
}
|
||||
return bindings
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all bindable properties from URL parameters.
|
||||
|
|
Loading…
Reference in New Issue