Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-08 16:01:57 +0300
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2017-11-08 16:04:34 +0300
commit176ad7670f70c0d0717bea2ea82e41ca37a5cc9f (patch)
treef2e924ac0ba294426ddc0626d11ea2c9c78c47bd /apps/files/js/breadcrumb.js
parentce391eeccbd11ad163eae9ee5b044d61441a321c (diff)
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.js5
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+')');
},