@jsenv/navi 0.16.8 → 0.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7891,26 +7891,24 @@ const createRoutePattern = (pattern) => {
7891
7891
  };
7892
7892
  }
7893
7893
 
7894
- // Check for incompatible cases
7895
- if (item.isUserProvided && !matchesChildLiteral) {
7894
+ // Check for generic parameter-literal conflicts
7895
+ if (!matchesChildLiteral) {
7896
7896
  // Check if this is a path parameter from parent pattern
7897
7897
  const isParentPathParam = connections.some(
7898
7898
  (conn) => conn.paramName === paramName,
7899
7899
  );
7900
7900
 
7901
7901
  if (isParentPathParam) {
7902
- // User provided a path param value that doesn't match this child's literals
7903
- return { isCompatible: false };
7904
- }
7905
- }
7902
+ // Parameter value (from user or signal) doesn't match this child's literals
7903
+ // Check if child has any literal segments that would conflict with this parameter
7904
+ const hasConflictingLiteral = childParsedPattern.segments.some(
7905
+ (segment) =>
7906
+ segment.type === "literal" && segment.value !== paramValue,
7907
+ );
7906
7908
 
7907
- // Special case: section parameter with settings literal
7908
- if (paramName === "section" && paramValue !== "settings") {
7909
- const hasSettingsLiteral = childParsedPattern.segments.some(
7910
- (segment) => segment.type === "literal" && segment.value === "settings",
7911
- );
7912
- if (hasSettingsLiteral) {
7913
- return { isCompatible: false };
7909
+ if (hasConflictingLiteral) {
7910
+ return { isCompatible: false };
7911
+ }
7914
7912
  }
7915
7913
  }
7916
7914