Skip to content

Commit

Permalink
fix: improve query handling (#2666)
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat authored Jan 19, 2023
1 parent 967787c commit 3386bee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/qwik-city/adaptors/shared/vite/post-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function createStaticPathsModule(basePathname: string, staticPaths: Set<string>,
c.push(` if (p.startsWith(${JSON.stringify(assetsPath)})) {`);
c.push(` return true;`);
c.push(` }`);
c.push(` if (url.searchParams.get('qwikcity.static') === "false") {`);
c.push(` if (url.search !== "") {`);
c.push(` return false;`);
c.push(` }`);
c.push(` if (staticPaths.has(p)) {`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function isStaticPath(method: string, url: URL) {
if (method !== 'GET') {
return false;
}
if (url.searchParams.get('qwikcity.static') === 'false') {
if (url.search !== '') {
return false;
}
return /\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(url.pathname);
Expand Down

0 comments on commit 3386bee

Please sign in to comment.