From 3c029e46d8cbfe06f3827fcbf4f368f8b6c8c984 Mon Sep 17 00:00:00 2001 From: Po Chun Chiu <57251712+EiffelFly@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:37:51 +0800 Subject: [PATCH] fix: fix console wrongly warn field not supporting multiple references (#948) Because - console wrongly warn field not supporting multiple references (We don't support this before, but since we change our reference syntax and support auto converting the reference to target type right now, so we support multiple references out of the box) This commit - fix console wrongly warn field not supporting multiple references --- .../transform/transformInstillJSONSchemaToZod.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/toolkit/src/lib/use-instill-form/transform/transformInstillJSONSchemaToZod.ts b/packages/toolkit/src/lib/use-instill-form/transform/transformInstillJSONSchemaToZod.ts index 42224fe1c7..3c3f3eaad4 100644 --- a/packages/toolkit/src/lib/use-instill-form/transform/transformInstillJSONSchemaToZod.ts +++ b/packages/toolkit/src/lib/use-instill-form/transform/transformInstillJSONSchemaToZod.ts @@ -321,13 +321,6 @@ export function transformInstillJSONSchemaToZod({ }); } - if (references.length > 1 && !acceptTemplate) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "This field only accepts single reference", - }); - } - if ( references.length === 0 && instillUpstreamValue &&