From e8c1997edc6a8e1774cddd5ce4289212437f3cbd Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 15 Mar 2023 19:07:38 +0800 Subject: [PATCH] fix: spread types may only be created from object types --- packages/nc-gui/components/cell/Checkbox.vue | 2 +- packages/nc-gui/components/virtual-cell/barcode/Barcode.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index f482d24511..5700a1a792 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -35,7 +35,7 @@ const checkboxMeta = $computed(() => { unchecked: 'mdi-checkbox-blank-circle-outline', }, color: 'primary', - ...(column?.value?.meta || {}), + ...(typeof column?.value?.meta === 'string' ? JSON.parse(column?.value?.meta) : column?.value?.meta || {}), } }) diff --git a/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue b/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue index 53a61a3d77..da670c0f97 100644 --- a/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue +++ b/packages/nc-gui/components/virtual-cell/barcode/Barcode.vue @@ -22,7 +22,7 @@ const showBarcodeModal = () => { const barcodeMeta = $computed(() => { return { barcodeFormat: 'CODE128', - ...(column?.value?.meta || {}), + ...(typeof column?.value?.meta === 'string' ? JSON.parse(column?.value?.meta) : column?.value?.meta || {}), } })