fixes: able to import olders apps with no components (#5016)

This commit is contained in:
Arpit 2022-12-20 12:35:43 +05:30 committed by GitHub
parent 2065e700cc
commit 309ab03498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ import { cloneDeep, omit } from 'lodash';
import { v4 as uuid } from 'uuid';
export function convertAppDefinitionFromSinglePageToMultiPage(appDefinition: any) {
const components = cloneDeep(appDefinition.components);
const components = cloneDeep(appDefinition?.components ?? {});
const newPageId = uuid();
const handle = 'home';
const name = 'Home';