diff options
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/js/sharebreadcrumbview.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/files_sharing/js/sharebreadcrumbview.js b/apps/files_sharing/js/sharebreadcrumbview.js index 9803c8f6dea..c6bf365ba07 100644 --- a/apps/files_sharing/js/sharebreadcrumbview.js +++ b/apps/files_sharing/js/sharebreadcrumbview.js @@ -43,12 +43,17 @@ render: function(data) { this._dirInfo = data.dirInfo; - var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0; - - this.$el.html(this.template({ - isShared: isShared - })); - this.delegateEvents(); + if (this._dirInfo !== null && (this._dirInfo.path !== '/' || this._dirInfo.name !== '')) { + var isShared = data.dirInfo && data.dirInfo.shareTypes && data.dirInfo.shareTypes.length > 0; + this.$el.html(this.template({ + isShared: isShared + })); + this.$el.show(); + this.delegateEvents(); + } else { + this.$el.empty(); + this.$el.hide(); + } return this; }, |