summaryrefslogtreecommitdiffstats
path: root/apps/files/js/detailsview.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/detailsview.js')
-rw-r--r--apps/files/js/detailsview.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/js/detailsview.js b/apps/files/js/detailsview.js
index ac10b8380ef..aed1736693a 100644
--- a/apps/files/js/detailsview.js
+++ b/apps/files/js/detailsview.js
@@ -118,10 +118,13 @@
*/
render: function() {
// remove old instances
- if ($('#app-sidebar').length === 0) {
+ var $appSidebar = $('#app-sidebar');
+ if ($appSidebar.length === 0) {
this.$el.insertAfter($('#app-content'));
} else {
- $('#app-sidebar').replaceWith(this.$el)
+ if ($appSidebar[0] !== this.el) {
+ $appSidebar.replaceWith(this.$el)
+ }
}
var templateVars = {