Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
fix: If query exists in url, module will not be parsed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Mar 7, 2020
1 parent e871c18 commit a8965b5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/deno_cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ export class CacheModule implements DenoCacheModule {
resolveModule(moduleName: string): DenoCacheModule | void {
// eg. import "/npm:tough-cookie@3?dew"
if (moduleName.startsWith("/")) {
const url = new URL(this.url.href);
url.pathname = moduleName;
const url = new URL(this.url.origin + moduleName);

const hash = hashURL(url);

Expand All @@ -86,8 +85,7 @@ export class CacheModule implements DenoCacheModule {
moduleName
);

const url = new URL(this.url.href);
url.pathname = targetUrlPath;
const url = new URL(this.url.origin + targetUrlPath);

const hash = hashURL(url);

Expand Down

0 comments on commit a8965b5

Please sign in to comment.