From 0a8b06bd5e7a386509bd728e7acd0297a5f94578 Mon Sep 17 00:00:00 2001 From: joak Date: Wed, 17 Jan 2024 01:09:45 +0100 Subject: [PATCH] fixed issue with empty spots again and again --- web/quilt/quilt.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/quilt/quilt.js b/web/quilt/quilt.js index 47ed0bb..549cde0 100644 --- a/web/quilt/quilt.js +++ b/web/quilt/quilt.js @@ -49,7 +49,7 @@ xhr.onload = function() { NAVI.classList.add("quiltnavigation"); var up = grid.find((element) => element.x == found.x+1 && element.y == found.y ); - if(up && (up.link != "empty" || up.name != "empty")){ + if(up && up.link.includes("http")){ var UP = document.createElement('a'); UP.title = up.name; UP.href = up.link; @@ -61,7 +61,7 @@ xhr.onload = function() { var left = grid.find((element) => element.x == found.x && element.y == found.y-1 ); - if(left && (left.link != "empty" || left.name != "empty")){ + if(left && left.link.includes("http")){ var LEFT = document.createElement('a'); LEFT.title = left.name; LEFT.href = left.link; @@ -82,7 +82,7 @@ xhr.onload = function() { NAVI.append(CENTER); var right = grid.find((element) => element.x == found.x && element.y == found.y+1 ); - if(right && (right.link != "empty" || right.name != "empty")){ + if(right && right.link.includes("http")){ var RIGHT = document.createElement('a'); RIGHT.title = right.name; RIGHT.href = right.link; @@ -93,7 +93,7 @@ xhr.onload = function() { } var down = grid.find((element) => element.x == found.x-1 && element.y == found.y ); - if(down && (down.link != "empty" || down.name != "empty")){ + if(down && down.link.includes("http")){ var DOWN = document.createElement('a'); DOWN.title = down.name; DOWN.href = down.link;