From 41798344ae585ca5852e27a721f26129e6da3358 Mon Sep 17 00:00:00 2001 From: Ozgu Karaca Date: Thu, 10 Nov 2016 13:10:28 +0200 Subject: [PATCH] Add files via upload --- src/js/bootstrap-treeview.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/js/bootstrap-treeview.js b/src/js/bootstrap-treeview.js index 7a82a2eeb..dd5167fef 100644 --- a/src/js/bootstrap-treeview.js +++ b/src/js/bootstrap-treeview.js @@ -528,13 +528,15 @@ // Add expand, collapse or empty spacer icons var classList = []; if (node.nodes) { - classList.push('expand-icon'); - if (node.state.expanded) { - classList.push(_this.options.collapseIcon); - } - else { - classList.push(_this.options.expandIcon); - } + if (node.nodes.length > 0) { + classList.push('expand-icon'); + if (node.state.expanded) { + classList.push(_this.options.collapseIcon); + } + else { + classList.push(_this.options.expandIcon); + } + } } else { classList.push(_this.options.emptyIcon);