Skip to content

Commit

Permalink
fix: last incorrect usage of path and origin
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Sep 18, 2024
1 parent 42708f3 commit 2bbd24d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default defineNuxtModule<ModuleOptions>({
}
}

const { origin, pathname = '' } = getOriginAndPathnameFromURL(baseURL)
const { origin, pathname } = getOriginAndPathnameFromURL(baseURL)

const selectedProvider = userOptions.provider?.type ?? 'authjs'

Expand Down
6 changes: 1 addition & 5 deletions src/runtime/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ export function getOriginAndPathnameFromURL(url: string) {
origin = `${protocol}//${host}`
}

const pathname_ = pathname.length > 0 ? pathname : undefined
return {
origin,
pathname: pathname_
}
return { origin, pathname }
}

// We use `DeepRequired` here because options are actually enriched using `defu`
Expand Down

0 comments on commit 2bbd24d

Please sign in to comment.