From 58364bb3b537638fce4047f234b29d5f67c735ea Mon Sep 17 00:00:00 2001 From: sintech Date: Tue, 14 Dec 2021 11:30:09 +0300 Subject: [PATCH] JS style fix --- InvenTree/templates/js/dynamic/nav.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/InvenTree/templates/js/dynamic/nav.js b/InvenTree/templates/js/dynamic/nav.js index 03ed946677..eed098f162 100644 --- a/InvenTree/templates/js/dynamic/nav.js +++ b/InvenTree/templates/js/dynamic/nav.js @@ -192,17 +192,17 @@ function enableBreadcrumbTree(options) { node = data[i]; if (node.parent != null) { - if (nodes[node.parent].nodes) { - nodes[node.parent].nodes.push(node); - } else { - nodes[node.parent].nodes = [node]; - } + if (nodes[node.parent].nodes) { + nodes[node.parent].nodes.push(node); + } else { + nodes[node.parent].nodes = [node]; + } if (node.state.expanded) { - while (node.parent != null) { - nodes[node.parent].state.expanded = true; - node = nodes[node.parent] - } + while (node.parent != null) { + nodes[node.parent].state.expanded = true; + node = nodes[node.parent]; + } } } else { @@ -226,7 +226,7 @@ function enableBreadcrumbTree(options) { // Add callback to "collapse" and "expand" the sidebar // Toggle treeview visibilty - $('#breadcrumb-tree-collapse').toggle(); + $('#breadcrumb-tree-collapse').toggle(); });