Skip to content

Commit 0fec10a

Browse files
authored
lint error on main x2 (#1133)
1 parent 99630ce commit 0fec10a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/tasks-gen/scripts/inference-codegen.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ async function generateBinaryInputTypes(
145145
return;
146146
}
147147
const propName = propSignature.name.getText(tsSource);
148-
const propIsMedia = !!spec["properties"]?.[propName]?.["comment"]?.includes("type=binary");
148+
149+
const propIsMedia =
150+
typeof spec["properties"] !== "string" &&
151+
typeof spec["properties"]?.[propName] !== "string" &&
152+
typeof spec["properties"]?.[propName]?.["comment"] === "string"
153+
? !!spec["properties"]?.[propName]?.["comment"]?.includes("type=binary")
154+
: false;
149155
if (!propIsMedia) {
150156
return;
151157
}

0 commit comments

Comments
 (0)