2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-08 17:22:32 +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>
import JIcon from './json-icon'
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 JsonBoolean from './types/json-boolean';
import JsonObject from './types/json-object';
@@ -36,7 +36,7 @@ export default {
computed: {
valueType() {
if (this.value === null || this.value === undefined) {
return 'Null';
return 'Undefined';
} else if (Array.isArray(this.value)) {
return 'Array';
} else if (typeof this.value === 'object') {
@@ -59,7 +59,7 @@ export default {
JsonBoolean,
JsonObject,
JsonArray,
JsonNull,
JsonUndefined,
JIcon
}
};
@@ -1,10 +1,10 @@
<template>
<span class="json-null">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
<span class="json-undefined">{{ jsonValue === null ? 'null' : 'undefined' }}</span>
</template>
<script>
export default {
name: 'JsonNull',
name: 'JsonUndefined',
props: {
jsonValue: Object
}
@@ -12,7 +12,7 @@ export default {
</script>
<style lang="scss">
.json-null {
.json-undefined {
color: #e08331;
}
</style>