mirror of
https://github.com/directus/directus.git
synced 2026-01-25 11:28:09 -05:00
Fix interface options that use a code editor (#18535)
This commit is contained in:
committed by
GitHub
parent
b56fc107a5
commit
0bc16ef304
@@ -30,7 +30,7 @@ import 'codemirror/keymap/sublime.js';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
value: string | Record<string, unknown> | unknown[] | boolean | number | null;
|
||||
value?: string | Record<string, unknown> | unknown[] | boolean | number | null;
|
||||
disabled?: boolean;
|
||||
altOptions?: Record<string, any>;
|
||||
template?: string;
|
||||
@@ -99,8 +99,8 @@ onMounted(async () => {
|
||||
}
|
||||
});
|
||||
|
||||
const stringValue = computed<string>(() => {
|
||||
if (props.value === null) return '';
|
||||
const stringValue = computed(() => {
|
||||
if (props.value === null || props.value === undefined) return '';
|
||||
|
||||
if (props.type === 'json' || typeof props.value === 'object') {
|
||||
return JSON.stringify(props.value, null, 4);
|
||||
|
||||
Reference in New Issue
Block a user