From 48f5ce15d736708da074b77cab7e2a9246fd72bd Mon Sep 17 00:00:00 2001 From: bennykok Date: Wed, 5 Feb 2025 17:58:37 +0800 Subject: [PATCH] fix: fallback to default api runs --- web-plugin/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web-plugin/index.js b/web-plugin/index.js index 8a5cd0d..4439199 100644 --- a/web-plugin/index.js +++ b/web-plugin/index.js @@ -1976,6 +1976,12 @@ api.fetchApi = async (route, options) => { if (route.startsWith("/prompt") && ext.native_mode) { const info = await getSelectedWorkflowInfo(); + + if (!info.workflow_id) { + console.log("No workflow id found, fallback to original fetch"); + return await orginal_fetch_api.call(api, route, options); + } + console.log("info", info); if (info) { const body = JSON.parse(options.body);