2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-20 20:00:37 +03:00

rename JsonNull to JsonUndefined (due to a wired bug)

This commit is contained in:
STAFYNIAK Sacha
2018-09-17 06:49:01 +02:00
parent a580beb70c
commit c6e1d9270f
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -11,7 +11,7 @@
<script> <script>
import JIcon from './json-icon' import JIcon from './json-icon'
import JsonString from './types/json-string'; import JsonString from './types/json-string';
import JsonNull from './types/json-null'; import JsonUndefined from './types/json-undefined';
import JsonNumber from './types/json-number'; import JsonNumber from './types/json-number';
import JsonBoolean from './types/json-boolean'; import JsonBoolean from './types/json-boolean';
import JsonObject from './types/json-object'; import JsonObject from './types/json-object';
@@ -36,7 +36,7 @@ export default {
computed: { computed: {
valueType() { valueType() {
if (this.value === null || this.value === undefined) { if (this.value === null || this.value === undefined) {
return 'Null'; return 'Undefined';
} else if (Array.isArray(this.value)) { } else if (Array.isArray(this.value)) {
return 'Array'; return 'Array';
} else if (typeof this.value === 'object') { } else if (typeof this.value === 'object') {
@@ -59,7 +59,7 @@ export default {
JsonBoolean, JsonBoolean,
JsonObject, JsonObject,
JsonArray, JsonArray,
JsonNull, JsonUndefined,
JIcon JIcon
} }
}; };
@@ -1,10 +1,10 @@
<template> <template>
<span class="json-null">{{ jsonValue === null ? 'null' : 'undefined' }}</span> <span class="json-undefined">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
</template> </template>
<script> <script>
export default { export default {
name: 'JsonNull', name: 'JsonUndefined',
props: { props: {
jsonValue: Object jsonValue: Object
} }
@@ -12,7 +12,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.json-null { .json-undefined {
color: #e08331; color: #e08331;
} }
</style> </style>