2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-05 16:42:30 +03:00

add support for 'undefined' values in json objects

This commit is contained in:
STAFYNIAK Sacha
2018-09-17 05:58:30 +02:00
parent 2808975c75
commit 614a37caf2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export default {
},
computed: {
valueType() {
if (this.value === null) {
if (this.value === null || this.value === undefined) {
return 'Null';
} else if (Array.isArray(this.value)) {
return 'Array';
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<span class="json-null">null</span>
<span class="json-null">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
</template>
<script>