diff --git a/web/app/editor/EditorModel.ts b/web/app/editor/EditorModel.ts index 34b75d5e0e..d01534a785 100644 --- a/web/app/editor/EditorModel.ts +++ b/web/app/editor/EditorModel.ts @@ -149,8 +149,8 @@ const ensureModelId = ( force?: boolean ): Identified | undefined => { if (model && (force || !isIdentified(model))) { - ;(model as any).modelId = calculateModelId(model) - ;(model as any).data = null // reset modelData caching + ; (model as any).modelId = calculateModelId(model) + ; (model as any).data = null // reset modelData caching } return model as Identified } @@ -504,9 +504,9 @@ export const createOptionalEmpty = ( ): OptionalModel => isSomeOptionalModel(optModel) ? { - optional: optModel.optional, - optionalPrototype: optModel.optionalPrototype - } + optional: optModel.optional, + optionalPrototype: optModel.optionalPrototype + } : {} export const resetOptionalModel = < @@ -761,13 +761,13 @@ export const validateModel = < const pushError = (model: EditorModel & Contextualized, results: ModelErrorRecord) => - (error: ModelError) => { - const path = justPath(model.path) - const fullPath = path.concat(error.path || []).join('.') - results[fullPath] - ? results[fullPath].push(error) - : (results[fullPath] = [error]) - } + (error: ModelError) => { + const path = justPath(model.path) + const fullPath = path.concat(error.path || []).join('.') + results[fullPath] + ? results[fullPath].push(error) + : (results[fullPath] = [error]) + } const validateInner = ( model: EditableModel & Contextualized, @@ -865,18 +865,18 @@ const modelItemsRaw = (model?: EditorModel): EditorModel[] => const contextualizeProperty = , T extends object>(mainModel: M) => - ( - property?: ObjectModelProperty - ): ContextualizedObjectModelProperty | undefined => { - if (!property) return property - const model = contextualizeChild(mainModel, property.model, property.key)! - return R.mergeRight(property, { - model, - owner: mainModel, - editable: - property.editable === undefined ? mainModel.editable : property.editable - }) as any as ContextualizedObjectModelProperty - } + ( + property?: ObjectModelProperty + ): ContextualizedObjectModelProperty | undefined => { + if (!property) return property + const model = contextualizeChild(mainModel, property.model, property.key)! + return R.mergeRight(property, { + model, + owner: mainModel, + editable: + property.editable === undefined ? mainModel.editable : property.editable + }) as any as ContextualizedObjectModelProperty + } let arrayKeyCounter = 0 export const ensureArrayKey = (v: ListModel) => {