Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
/ framework Public archive

fix(nuxt): allow cookies to be set to null to unset them #8769

Merged
merged 5 commits into from
Nov 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add null directly to Ref generic
danielroe committed Nov 7, 2022

Unverified

No user is associated with the committer email.
commit d4211ab19e0ffdfb489aff86ea9af0eb117eb4c0
4 changes: 1 addition & 3 deletions packages/nuxt/src/app/composables/cookie.ts
Original file line number Diff line number Diff line change
@@ -15,9 +15,7 @@ export interface CookieOptions<T = any> extends _CookieOptions {
default?: () => T | Ref<T>
}

export interface CookieRef<T> extends Ref<T> {
value: T | null | undefined;
}
export interface CookieRef<T> extends Ref<T | null> {}

const CookieDefaults: CookieOptions<any> = {
path: '/',