mirror of
https://github.com/tenrok/vue-json-viewer.git
synced 2026-06-20 20:00:37 +03:00
add support for 'undefined' values in json objects
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
valueType() {
|
valueType() {
|
||||||
if (this.value === null) {
|
if (this.value === null || this.value === undefined) {
|
||||||
return 'Null';
|
return 'Null';
|
||||||
} else if (Array.isArray(this.value)) {
|
} else if (Array.isArray(this.value)) {
|
||||||
return 'Array';
|
return 'Array';
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="json-null">null</span>
|
<span class="json-null">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user