From d7f50ab6f6a237d4f0b3a05a06e14e00c9b5cb2d Mon Sep 17 00:00:00 2001 From: Oreille <33065839+Oreilles@users.noreply.github.com> Date: Thu, 2 Sep 2021 19:49:09 +0200 Subject: [PATCH] Fixes bug when trying to edit geometry in code interface. (#7778) --- app/src/interfaces/input-code/input-code.vue | 2 +- app/src/interfaces/input/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/interfaces/input-code/input-code.vue b/app/src/interfaces/input-code/input-code.vue index 4edeb3227a..143b6a963e 100644 --- a/app/src/interfaces/input-code/input-code.vue +++ b/app/src/interfaces/input-code/input-code.vue @@ -111,7 +111,7 @@ export default defineComponent({ const stringValue = computed(() => { if (props.value === null) return ''; - if (props.type === 'json') { + if (typeof props.value === 'object') { return JSON.stringify(props.value, null, 4); } diff --git a/app/src/interfaces/input/index.ts b/app/src/interfaces/input/index.ts index a4696179d7..869ba573f1 100644 --- a/app/src/interfaces/input/index.ts +++ b/app/src/interfaces/input/index.ts @@ -8,6 +8,6 @@ export default defineInterface({ description: '$t:interfaces.input.description', icon: 'text_fields', component: InterfaceInput, - types: ['string', 'uuid', 'bigInteger', 'integer', 'float', 'decimal', 'geometry', 'text'], + types: ['string', 'uuid', 'bigInteger', 'integer', 'float', 'decimal', 'text'], options: Options, });