From f00b3d6b7dcd6a5752ce5359742934fcb52c72b7 Mon Sep 17 00:00:00 2001 From: sisidovski Date: Mon, 15 Jan 2024 16:33:00 +0900 Subject: [PATCH] More strict check for init["baseURL"] in URLPatternInit processing init["baseURL"] is initialized with null, and map-exists only checks if there exists an entry with the key. This commit adds null or empty string check for init["baseURL"] in URLPatternInit processing. --- spec.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.bs b/spec.bs index adfd67c..e73e121 100644 --- a/spec.bs +++ b/spec.bs @@ -1807,7 +1807,7 @@ To convert a modifier to a string given a [=part/modifier=] |modifier 1. Set |result|["{{URLPatternInit/search}}"] to |search|. 1. Set |result|["{{URLPatternInit/hash}}"] to |hash|. 1. Let |baseURL| be null. - 1. If |init|["{{URLPatternInit/baseURL}}"] [=map/exists=]: + 1. If |init|["{{URLPatternInit/baseURL}}"] [=map/exists=] and is a non-empty string:
The base URL can be used to supply additional context, but for each component, if |init| includes a component which is at least as specific as one in the base URL, none is inherited.