From 1295d4f5ce42c0aa36ca4b121132b169e1a7e430 Mon Sep 17 00:00:00 2001 From: William Mantly Date: Fri, 10 Jul 2026 00:24:16 -0400 Subject: [PATCH] Fixed issue with matching wild card --- nodejs/models/host.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodejs/models/host.js b/nodejs/models/host.js index 0391fe9..335616b 100755 --- a/nodejs/models/host.js +++ b/nodejs/models/host.js @@ -359,9 +359,11 @@ class Host extends Table{ // A match in the lookup tree takes priority being a more exact match. if({...last_resort, ...place}[fragment]){ place = {...last_resort, ...place}[fragment]; + // If we have a not exact fragment match, a wild card will do. }else if(place['*']){ place = place['*'] + // If no fragment can be matched, continue with the long wild card branch. }else if(last_resort){ place = last_resort; @@ -372,7 +374,7 @@ class Host extends Table{ if(place && place['#record']) return place['#record']; // If the parent has a wild, its the wildcard we want. - if(parent && parent['*']['#record']) return parent['*']['#record']; + if(parent && parent['*'] && parent['*']['#record']) return parent['*']['#record']; } static async lookUpReady(){