Skip to content

Commit

Permalink
Change var to let
Browse files Browse the repository at this point in the history
  • Loading branch information
kotx committed Aug 4, 2022
1 parent f94d383 commit ee8c844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Env {
type ParsedRange = { offset: number, length: number } | { suffix: number };

function rangeHasLength(object: ParsedRange): object is { offset: number, length: number } {
return (<{offset: number, length: number}>object).length !== undefined;
return (<{ offset: number, length: number }>object).length !== undefined;
}

function hasBody(object: R2Object | R2ObjectBody): object is R2ObjectBody {
Expand Down Expand Up @@ -49,7 +49,7 @@ export default {

if (!response || !response.ok) {
console.warn("Cache miss");
var path = (env.PATH_PREFIX || "") + decodeURIComponent(url.pathname.substring(1));
let path = (env.PATH_PREFIX || "") + decodeURIComponent(url.pathname.substring(1));

// Look for index file if asked for a directory
if (env.INDEX_FILE && (path.endsWith("/") || path === "")) {
Expand Down

0 comments on commit ee8c844

Please sign in to comment.