Skip to content

Commit 60f85e7

Browse files
committed
feat: reorder primitive literal union check for improved type handling
1 parent e94977f commit 60f85e7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/util/schema.util.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,6 @@ export const getSchema = (
144144
],
145145
};
146146

147-
// Check primitive literal union first (e.g., "a" | "b" | "c")
148-
if (isPrimitiveLiteralUnion(parameterType)) {
149-
return { input: "select", ...suggestions };
150-
}
151-
152147
// Check individual primitive types
153148
if (isBoolean(parameterType)) {
154149
return { input: "boolean", ...suggestions };
@@ -160,6 +155,11 @@ export const getSchema = (
160155
return { input: "text", ...suggestions };
161156
}
162157

158+
// Check primitive literal union first (e.g., "a" | "b" | "c")
159+
if (isPrimitiveLiteralUnion(parameterType)) {
160+
return { input: "select", ...suggestions };
161+
}
162+
163163
// Check if type has call signatures (is callable/sub-flow)
164164
if (isSubFlow(parameterType)) {
165165
return { input: "sub-flow", ...suggestions };

0 commit comments

Comments
 (0)