|
|
@@ -1,4 +1,4 @@
|
|
|
-// src/main.ts
|
|
|
+// src/recipes.ts
|
|
|
async function fetchData() {
|
|
|
const [buildingsResponse, recipesResponse, exchangesResponse] = await Promise.all([
|
|
|
fetch("https://api.prunplanner.org/data/buildings"),
|
|
|
@@ -75,6 +75,8 @@ function render({ buildings, recipes, prices }) {
|
|
|
tbody.appendChild(row);
|
|
|
}
|
|
|
}
|
|
|
-fetchData().then(render);
|
|
|
+if (document.querySelector("tbody")) {
|
|
|
+ fetchData().then(render);
|
|
|
+}
|
|
|
|
|
|
-//# debugId=5C43254EC8D8A7F364756E2164756E21
|
|
|
+//# debugId=AA0BA8B70839899464756E2164756E21
|