Skip to content

Commit

Permalink
fix(types): remove null result from getLocaleCookie to simplify t…
Browse files Browse the repository at this point in the history
…ypes
  • Loading branch information
rchl committed Sep 3, 2019
1 parent c3a678c commit df5ac8a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/plugins/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export default async (context) => {
return cookies[cookieKey]
}
}
return null
}

const setLocaleCookie = locale => {
Expand Down
2 changes: 1 addition & 1 deletion types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ declare namespace NuxtVueI18n {
routesNameSeparator: string
beforeLanguageSwitch: () => any
onLanguageSwitched: () => any
getLocaleCookie: () => string | undefined | null
getLocaleCookie: () => string | undefined
setLocaleCookie: (locale: string) => undefined
setLocale: (locale: string) => Promise<undefined>
}
Expand Down

0 comments on commit df5ac8a

Please sign in to comment.