This is an automated email from the ASF dual-hosted git repository.

xincheng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new a16a15c84e [Fix-15698][UI] close the definition when opened in the new 
tab (#15736)
a16a15c84e is described below

commit a16a15c84e9d211a285cd1494c8c266c7ac2d602
Author: arlendp <[email protected]>
AuthorDate: Tue Mar 19 14:03:26 2024 +0800

    [Fix-15698][UI] close the definition when opened in the new tab (#15736)
    
    Co-authored-by: xiangzihao <[email protected]>
---
 .../src/views/projects/workflow/components/dag/dag-toolbar.tsx     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-toolbar.tsx
 
b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-toolbar.tsx
index ae538924d1..02c62b9bd6 100644
--- 
a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-toolbar.tsx
+++ 
b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-toolbar.tsx
@@ -148,17 +148,18 @@ export default defineComponent({
      * Back to the entrance
      */
     const onClose = () => {
-      if (history.state.back !== '/login') {
+      const { back, current } = history.state
+      if (back && back !== '/login') {
         router.go(-1)
         return
       }
-      if (history.state.current.includes('workflow/definitions')) {
+      if (!back || current.includes('workflow/definitions')) {
         router.push({
           path: `/projects/${route.params.projectCode}/workflow-definition`
         })
         return
       }
-      if (history.state.current.includes('workflow/instances')) {
+      if (current.includes('workflow/instances')) {
         router.push({
           path: `/projects/${route.params.projectCode}/workflow/instances`
         })

Reply via email to