From 0bbc4be40b90909da6c959a749c6238876ba4138 Mon Sep 17 00:00:00 2001 From: onezDerv Date: Sun, 15 Sep 2024 02:03:42 -0400 Subject: [PATCH] fallback fetch data --- js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 38323f0..778aa2b 100644 --- a/js/app.js +++ b/js/app.js @@ -28,8 +28,8 @@ async function genTree(treeId) { } async function main() { - // fetchData = await fetch(`https://scratch.mit.edu/projects/${treeID}/remixtree/bare/`).then(x => x.json()); - fetchData = await fetch(`https://hf.zenoverse.net/tree/`).then(x => x.json()); + fetchData = await fetch(`https://scratch.mit.edu/projects/${treeID}/remixtree/bare/`).then(x => x.json()); + fetchData = fetchData || await fetch(`https://hf.zenoverse.net/tree/`).then(x => x.json()); let latestData = await fetch(`https://hf.zenoverse.net/api/`).then(x => x.json());