Skip to content

Commit

Permalink
lint error on main x2 (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
SBrandeis authored Jan 23, 2025
1 parent 99630ce commit 0fec10a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/tasks-gen/scripts/inference-codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,13 @@ async function generateBinaryInputTypes(
return;
}
const propName = propSignature.name.getText(tsSource);
const propIsMedia = !!spec["properties"]?.[propName]?.["comment"]?.includes("type=binary");

const propIsMedia =
typeof spec["properties"] !== "string" &&
typeof spec["properties"]?.[propName] !== "string" &&
typeof spec["properties"]?.[propName]?.["comment"] === "string"
? !!spec["properties"]?.[propName]?.["comment"]?.includes("type=binary")
: false;
if (!propIsMedia) {
return;
}
Expand Down

0 comments on commit 0fec10a

Please sign in to comment.