fix build
This commit is contained in:
parent
8bc6655073
commit
e88230997b
@ -25,14 +25,16 @@ export async function RunInputs({
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{Object.entries(run.workflow_inputs).map(([key, data]) => {
|
||||
let imageUrl;
|
||||
let imageUrl: string | undefined;
|
||||
try {
|
||||
if (data.startsWith("data:image/")) {
|
||||
imageUrl = data;
|
||||
} else {
|
||||
const url = new URL(data);
|
||||
if (url.pathname.endsWith(".png")) {
|
||||
if (typeof data === "string") {
|
||||
if (data.startsWith("data:image/")) {
|
||||
imageUrl = data;
|
||||
} else {
|
||||
const url = new URL(data);
|
||||
if (url.pathname.endsWith(".png")) {
|
||||
imageUrl = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (_) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user