diff --git a/src/stores/mapPathStore.ts b/src/stores/mapPathStore.ts index cccb723..7c7479c 100644 --- a/src/stores/mapPathStore.ts +++ b/src/stores/mapPathStore.ts @@ -193,10 +193,10 @@ export const useMapPathStore = defineStore('mapPathStore', { }, depthFirstSearchMatchTwoPaths(curPath, curPathIndex, curButton, listIndex, nodeIndex) { if (listIndex >= curButton.length) { // Bounds check to prevent out-of-range access - return; // nodeIndex is the path index in the list after selecting one of the five buttons + return false; // nodeIndex is the path index in the list after selecting one of the five buttons } if (nodeIndex >= curButton[listIndex].length) { // Bounds check to prevent out-of-range access - return; // The node index within this path in the list + return false; // The node index within this path in the list } // If `curPath` and `curButton[listIndex]` fully match if (curPathIndex === curPath.length || nodeIndex === curButton[listIndex].length) { @@ -205,7 +205,7 @@ export const useMapPathStore = defineStore('mapPathStore', { // Bounds check to prevent out-of-range access if (curPathIndex >= curPath.length || nodeIndex >= curButton[listIndex].length) { - return; + return false; } const nodeLabel = curPath[curPathIndex].data('label');