diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 19:12:56 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 19:12:56 +0100 |
commit | aea30e0004bed8f2a36f0c1e79aa16abe884a7d2 (patch) | |
tree | f10379a92b680b6ad3b4d5d6736896cf4f2efbcd /apps | |
parent | 584272962a0971d1025c1577f578985d0de7ec83 (diff) | |
download | nextcloud-server-aea30e0004bed8f2a36f0c1e79aa16abe884a7d2.tar.gz nextcloud-server-aea30e0004bed8f2a36f0c1e79aa16abe884a7d2.zip |
Scrutinizer fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/breadcrumb.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index fc907d5ccc7..e548084f33f 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -157,13 +157,13 @@ // Menu creation this._createMenu(); - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - if(part.dir) { + for (var j = 0; j < parts.length; j++) { + var menuPart = parts[j]; + if(menuPart.dir) { $menuItem = $('<li class="crumblist"><a><span class="icon-folder"></span><span></span></a></li>'); - $menuItem.data('dir', part.dir); - $menuItem.find('a').attr('href', this.getCrumbUrl(part, i)); - $menuItem.find('span:eq(1)').text(part.name); + $menuItem.data('dir', menuPart.dir); + $menuItem.find('a').attr('href', this.getCrumbUrl(part, j)); + $menuItem.find('span:eq(1)').text(menuPart.name); this.$menu.children('ul').append($menuItem); if (this.onClick) { $menuItem.on('click', this.onClick); @@ -311,7 +311,7 @@ _updateMenu: function() { var menuItems = this.$el.find('.crumb.hidden'); // Hide the crumb menu if no elements - this.$el.find('.crumbmenu').toggleClass('hidden', menuItems.length === 0) + this.$el.find('.crumbmenu').toggleClass('hidden', menuItems.length === 0); this.$menu.find('li').addClass('in-breadcrumb'); for (var i = 0; i < menuItems.length; i++) { |