Remove unused vars

This commit is contained in:
Andrew Kingston 2021-01-21 15:49:58 +00:00
parent 001520adad
commit 86a3caa881
2 changed files with 0 additions and 23 deletions

View File

@ -4,7 +4,6 @@ import rowListScreen from "./rowListScreen"
import emptyNewRowScreen from "./emptyNewRowScreen" import emptyNewRowScreen from "./emptyNewRowScreen"
import createFromScratchScreen from "./createFromScratchScreen" import createFromScratchScreen from "./createFromScratchScreen"
import emptyRowDetailScreen from "./emptyRowDetailScreen" import emptyRowDetailScreen from "./emptyRowDetailScreen"
import { uuid } from "builderStore/uuid"
const allTemplates = tables => [ const allTemplates = tables => [
createFromScratchScreen, createFromScratchScreen,

View File

@ -26,25 +26,3 @@ export const enrichDataBinding = async (input, context) => {
export const enrichDataBindings = async (props, context) => { export const enrichDataBindings = async (props, context) => {
return await processObject(cloneDeep(props), context) return await processObject(cloneDeep(props), context)
} }
/**
* Recurses through an object and enriches all string props found.
*/
const recursiveEnrich = (props, context) => {
if (typeof props !== "object") {
return
}
let keys = []
if (Array.isArray(props)) {
keys = Array.from(props.keys())
} else if (typeof props === "object") {
keys = Object.keys(props || {})
}
keys.forEach(key => {
if (typeof props[key] === "string") {
props[key] = enrichDataBinding(props[key], context)
} else {
recursiveEnrich(props[key], context)
}
})
}