Fix typing in formatted-json-value display

This commit is contained in:
rijkvanzanten
2020-12-01 11:55:39 -05:00
parent fd99c2d3ef
commit d3b038289e

View File

@@ -18,14 +18,14 @@ export default defineComponent({
},
format: {
type: String,
default: false,
default: null,
},
},
setup(props) {
const displayValue = computed(() => {
if (!props.value) return null;
try {
return render(props.format, props.value);
return render(props.format || '', props.value);
} catch (error) {
return null;
}