Skip to content

Commit

Permalink
fix: don't truncate url at ?
Browse files Browse the repository at this point in the history
Co-authored-by: Luis Ball <lball@imgix.com>
  • Loading branch information
frederickfogerty and luqven committed Jun 4, 2021
1 parent 6860d8e commit 26c981b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export const parseHostE = (uri: string) =>
/**
* Parse the path from a URL. Can fail - for an FP type, use parsePathE
*/
export const parsePath = (uri: string): string => new Uri(uri).path();
export const parsePath = (_uri: string): string => {
const uri = new Uri(_uri);
return uri.path() + uri.query();
};

export const parsePathE = (uri: string) =>
E.tryCatch(
() => parsePath(uri),
Expand Down

0 comments on commit 26c981b

Please sign in to comment.