diff --git a/src/components/NodePreview.vue b/src/components/NodePreview.vue
index 48b13bd03..43d21331f 100644
--- a/src/components/NodePreview.vue
+++ b/src/components/NodePreview.vue
@@ -40,7 +40,7 @@ https://github.com/Nuked88/ComfyUI-N-Sidebar/blob/7ae7da4a9761009fb6629bc04c6830
{{ widgetInput.name }}
- {{ widgetInput.default }}
+ {{ truncateDefaultValue(widgetInput.default) }}
▶
@@ -73,6 +73,12 @@ const slotInputDefs = allInputDefs.filter(
const widgetInputDefs = allInputDefs.filter((input) =>
nodeDefStore.inputIsWidget(input)
)
+const truncateDefaultValue = (value: any): string => {
+ if (value instanceof Object) {
+ return _.truncate(JSON.stringify(value), { length: 20 })
+ }
+ return value
+}