From 3331cdd74abb89692c9d37ba503a9d36768ae7d9 Mon Sep 17 00:00:00 2001
From: "John Molakvoæ (skjnldsv)" <skjnldsv@protonmail.com>
Date: Wed, 23 Oct 2019 18:40:48 +0200
Subject: Fix legacy tab backbone fileinfo change
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
---
 apps/files/src/components/LegacyTab.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'apps/files/src/components/LegacyTab.vue')

diff --git a/apps/files/src/components/LegacyTab.vue b/apps/files/src/components/LegacyTab.vue
index 9a85ee7f073..54a24edcdd7 100644
--- a/apps/files/src/components/LegacyTab.vue
+++ b/apps/files/src/components/LegacyTab.vue
@@ -40,7 +40,6 @@ export default {
 		},
 		name: {
 			type: String,
-			default: '',
 			required: true
 		},
 		fileInfo: {
@@ -74,10 +73,16 @@ export default {
 			}
 		}
 	},
+	beforeMount() {
+		this.setFileInfo(this.fileInfo)
+	},
 	mounted() {
 		// append the backbone element and set the FileInfo
 		this.component.$el.appendTo(this.$el)
 	},
+	beforeDestroy() {
+		this.component.remove()
+	},
 	methods: {
 		setFileInfo(fileInfo) {
 			this.component.setFileInfo(new OCA.Files.FileInfoModel(fileInfo))
-- 
cgit v1.2.3

