From bc8a93ce5e0c725459b9e8d8938605d273e32b43 Mon Sep 17 00:00:00 2001 From: Babibubebon Date: Thu, 8 Sep 2022 03:36:10 +0900 Subject: [PATCH] fix --- layouts/partials/docs/inject/head.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/layouts/partials/docs/inject/head.html b/layouts/partials/docs/inject/head.html index fcfa260..4f98546 100644 --- a/layouts/partials/docs/inject/head.html +++ b/layouts/partials/docs/inject/head.html @@ -15,7 +15,17 @@ id: tabName }); } - tab.setQuery(query); + try { + tab.setQuery(query); + } catch (error) { + tab.close(); + tab = yasguiInstance.addTab(true, { + ...Yasgui.Tab.getDefaults(), + requestConfig: endpoint ? {endpoint: endpoint} : yasguiInstance.config.requestConfig, + name: tabName, + id: tabName + }); + } tab.yasqe.query(); }