From 6ac170c348d468f7791dafbf07d7d83ad0b834ef Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 17 Jun 2025 15:07:18 +0800 Subject: [PATCH] * [bug #63181] fix create api not work. --- lib/zin/wg/docapp/js/v1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zin/wg/docapp/js/v1.js b/lib/zin/wg/docapp/js/v1.js index c7f6f9f337..9981c9ef74 100644 --- a/lib/zin/wg/docapp/js/v1.js +++ b/lib/zin/wg/docapp/js/v1.js @@ -1172,11 +1172,11 @@ const commands = const docApp = getDocApp(); if(!docApp.libList.length) return zui.Modal.alert(getLang('createLibFirst')); + const docType = (args && args[1]) || 'doc'; const {spaceType} = docApp; - if(spaceType === 'api') return docApp.startCreateDoc(); + if(spaceType === 'api' || docType === 'api') return docApp.startCreateDoc(); const {spaceID, libID, moduleID} = docApp; - const docType = (args && args[1]) || 'doc'; return showDocBasicModal(args?.[0] ?? 0, 0, true, docType).then((formData) => { zui.Editor.loadModule().then(() => { const emptyDoc = zui.Editor.createEmptyDoc();