From 505c18041bebf533ec63fed3790f54f5c6e1843b Mon Sep 17 00:00:00 2001
From: HampusM <hampus@hampusmat.com>
Date: Sat, 3 Jul 2021 17:45:18 +0200
Subject: Made a bunch of frontend stuff work

---
 packages/client/src/views/RepositoryTree.vue | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'packages/client/src/views/RepositoryTree.vue')

diff --git a/packages/client/src/views/RepositoryTree.vue b/packages/client/src/views/RepositoryTree.vue
index 351591a..6a788d3 100644
--- a/packages/client/src/views/RepositoryTree.vue
+++ b/packages/client/src/views/RepositoryTree.vue
@@ -58,23 +58,22 @@ export default {
 		const tree = ref(null);
 		const blob_content = ref(null);
 		const is_loading = ref(true);
-		const fetch_failed = ref(null);
+		const fetch_failed = ref("");
 		const path = ref("");
 
 		const fetchTree = async(repository) => {
 			blob_content.value = null;
 			tree.value = null;
-
 			path.value = props.pathArr ? props.pathArr.join("/") : undefined;
 
 			const tree_data = await fetchData(`repos/${repository}/tree${path.value ? "?path=" + path.value : ""}`, fetch_failed, is_loading, "tree");
 
 			if(tree_data) {
 				if(tree_data.type === "tree") {
-					let tree_trees = tree_data.tree.filter((entry) => entry.type === "tree");
+					let tree_trees = tree_data.content.filter((entry) => entry.type === "tree");
 					tree_trees = tree_trees.sort((a, b) => a.name.localeCompare(b.name));
 
-					let tree_blobs = tree_data.tree.filter((entry) => entry.type === "blob");
+					let tree_blobs = tree_data.content.filter((entry) => entry.type === "blob");
 					tree_blobs = tree_blobs.sort((a, b) => a.name.localeCompare(b.name));
 
 					tree.value = tree_trees.concat(tree_blobs);
-- 
cgit v1.2.3-18-g5258

