From a16972356fbeb560430d30f920c3d557d1133193 Mon Sep 17 00:00:00 2001
From: Guillaume Heurtier <guillaume.heurtier@maarch.org>
Date: Thu, 11 Jun 2020 15:46:22 +0200
Subject: [PATCH] FEAT #13993 TIME 2:20 fix entity not selected in redirect
 action

---
 .../redirect-action/redirect-action.component.ts   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/frontend/app/actions/redirect-action/redirect-action.component.ts b/src/frontend/app/actions/redirect-action/redirect-action.component.ts
index 2a63e260ad0..769926022cc 100644
--- a/src/frontend/app/actions/redirect-action/redirect-action.component.ts
+++ b/src/frontend/app/actions/redirect-action/redirect-action.component.ts
@@ -168,14 +168,14 @@ export class RedirectActionComponent implements OnInit {
                 })
                 // create the instance
                 .jstree();
-        }, 0);
 
-        if (this.currentEntity.serialId > 0) {
-            setTimeout(() => {
-                $('#jstree').jstree('select_node', this.currentEntity);
-                this.selectEntity(this.currentEntity, true);
-            }, 200);
-        }
+            if (this.currentEntity.serialId > 0) {
+                setTimeout(() => {
+                    $('#jstree').jstree('select_node', this.currentEntity);
+                    this.selectEntity(this.currentEntity, true);
+                }, 200);
+            }
+        }, 0);
     }
 
     loadDestUser() {
-- 
GitLab