From cdca9132ca85a25600498023725575b12f210df4 Mon Sep 17 00:00:00 2001 From: Hasu Date: Thu, 13 Jan 2022 10:55:59 +0900 Subject: [PATCH] [fix] fix #159 --- src/builderUtils/props2String.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/builderUtils/props2String.ts b/src/builderUtils/props2String.ts index b098f3e2..4b4a7bbc 100644 --- a/src/builderUtils/props2String.ts +++ b/src/builderUtils/props2String.ts @@ -16,7 +16,8 @@ export type Prop = { } const array2String = (val: PropValue, indent: string) => { - const hasMulti = (val.isEnum || val.hasOf) && Array.isArray(val.value) && val.value.length + const hasMulti = + ((val.isEnum || val.hasOf) && Array.isArray(val.value) && val.value.length) || val.nullable return `${hasMulti ? '(' : ''}${value2String(val, indent)}${hasMulti ? ')' : ''}[]` }