diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 14:01:57 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-08 14:04:34 +0100 |
commit | 176ad7670f70c0d0717bea2ea82e41ca37a5cc9f (patch) | |
tree | f2e924ac0ba294426ddc0626d11ea2c9c78c47bd /apps/files/js/breadcrumb.js | |
parent | ce391eeccbd11ad163eae9ee5b044d61441a321c (diff) | |
download | nextcloud-server-176ad7670f70c0d0717bea2ea82e41ca37a5cc9f.tar.gz nextcloud-server-176ad7670f70c0d0717bea2ea82e41ca37a5cc9f.zip |
Fix to-be-shown algorithm
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/breadcrumb.js')
-rw-r--r-- | apps/files/js/breadcrumb.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files/js/breadcrumb.js b/apps/files/js/breadcrumb.js index b32cbf89b42..4d67d1600fe 100644 --- a/apps/files/js/breadcrumb.js +++ b/apps/files/js/breadcrumb.js @@ -249,9 +249,10 @@ * Get the crumb to show */ _getCrumbElement: function() { - var length = this.$el.find('.crumb.hidden').length; + var hidden = this.$el.find('.crumb.hidden').length; + var shown = this.$el.find('.crumb:not(.hidden):not(.crumbhome):not(.crumbmenu)').length; // Get the outer one with priority to the highest - var elmt = (length % 2) * (length - 1); + var elmt = (1 - shown % 2) * (hidden - 1); return this.$el.find('.crumb.hidden:eq('+elmt+')'); }, |