From 56e31db490378969fac830807b86b354482cc098 Mon Sep 17 00:00:00 2001 From: megatwig <137281832+megatwig@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:14:59 +0000 Subject: [PATCH] Fix basic `pathParser` plugin functionality (#502) --- plugins/pathParser/pathParser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/pathParser/pathParser.js b/plugins/pathParser/pathParser.js index c456308..ba4732a 100644 --- a/plugins/pathParser/pathParser.js +++ b/plugins/pathParser/pathParser.js @@ -322,6 +322,7 @@ function testRule(pattern, parts) { } var matchedParts = []; + var subMatches; for (var i = 0; i < pattern.length; i++) { if ((subMatches = testPattern(pattern[i], parts[i])) == null) { return null; @@ -653,7 +654,7 @@ function tryGetTag(tag) { var result = gql.Do(query, variables); if (!result.findTags || result.findTags.count == 0) { - return; + return null; } return result.findTags.tags[0].id;