Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
`Invalid "new document" configuration: "part:@sanity/base/new-document-structure" should return an array of items. Falling back to default structure.`
)
structure = S.defaultInitialValueTemplateItems()
} else if (structure) {
try {
validateNewDocumentStructure(structure)
} catch (err) {
// eslint-disable-next-line no-console
console.error(
`Invalid "new document" configuration: ${err.message}. Falling back to default structure.`
)
structure = S.defaultInitialValueTemplateItems()
}
} else {
// No structure defined, use default
structure = S.defaultInitialValueTemplateItems()
}
return createModalActions(structure)
}