mirror of
https://github.com/directus/directus.git
synced 2026-01-30 20:57:55 -05:00
Handle empty toolbar in wysiwyg
This commit is contained in:
@@ -191,7 +191,7 @@ export default defineComponent({
|
||||
default: '',
|
||||
},
|
||||
toolbar: {
|
||||
type: Array as PropType<string[]>,
|
||||
type: Array as PropType<string[] | null>,
|
||||
default: () => [
|
||||
'bold',
|
||||
'italic',
|
||||
@@ -310,7 +310,7 @@ export default defineComponent({
|
||||
styleFormats = props.customFormats;
|
||||
}
|
||||
|
||||
let toolbarString = props.toolbar
|
||||
let toolbarString = (props.toolbar ?? [])
|
||||
.map((t) =>
|
||||
t
|
||||
.replace(/^link$/g, 'customLink')
|
||||
|
||||
Reference in New Issue
Block a user