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.
|
* Gets all state bindings that are globally available.
|
||||||
*/
|
*/
|
||||||
const getStateBindings = () => {
|
const getStateBindings = () => {
|
||||||
|
let bindings = []
|
||||||
|
if (get(store).clientFeatures?.state) {
|
||||||
const safeState = makePropSafe("state")
|
const safeState = makePropSafe("state")
|
||||||
return getAllStateVariables().map(key => ({
|
bindings = getAllStateVariables().map(key => ({
|
||||||
type: "context",
|
type: "context",
|
||||||
runtimeBinding: `${safeState}.${makePropSafe(key)}`,
|
runtimeBinding: `${safeState}.${makePropSafe(key)}`,
|
||||||
readableBinding: `State.${key}`,
|
readableBinding: `State.${key}`,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
return bindings
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all bindable properties from URL parameters.
|
* Gets all bindable properties from URL parameters.
|
||||||
|
|
Loading…
Reference in New Issue