Skip to content

Commit

Permalink
Fixed issue where empty query string would be 'null'
Browse files Browse the repository at this point in the history
  • Loading branch information
c-kick committed Dec 27, 2023
1 parent 4a79a36 commit db09105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .idea/deployment.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion hnl.dynamicimports.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const defaultPaths = {
* @returns {string} - The rewritten URI with the site nonce appended, if it exists.
*/
function rewritePath(uri, dynamicPaths) {
const params = new URLSearchParams(uri.split('?')[1] || null);
const params = new URLSearchParams(uri.split('?')[1] || '');
//check if path was preceded by a %path%, indicating a custom path to a uniform resource locator prefix
let customPath = (new RegExp(/^%(.*?)%/gi).exec(uri));
if (customPath && dynamicPaths[customPath[1]]) {
Expand Down

0 comments on commit db09105

Please sign in to comment.