Skip to content

Commit

Permalink
Remove startsWithHash as isWsService caters for this
Browse files Browse the repository at this point in the history
  • Loading branch information
amoore108 committed Oct 22, 2024
1 parent 4bbb775 commit 215101a
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,11 @@ const addLiteExtension = (href?: string) => {
url.pathname?.split('/')?.[1] as Services,
);

const startsWithHash = url.href?.startsWith('#');

const hasReservedRouteExtension =
RESERVED_ROUTE_EXTENSIONS.includes(extension);

const shouldAddLiteExtension =
isValidDomain &&
isWsService &&
!hasReservedRouteExtension &&
!startsWithHash;
isValidDomain && isWsService && !hasReservedRouteExtension;

if (shouldAddLiteExtension) {
url.pathname += '.lite';
Expand Down

0 comments on commit 215101a

Please sign in to comment.