Skip to content

Commit daf1b62

Browse files
committed
feat: Remove plugins and skipInit from storage options when passing to the authstore.
1 parent 2583bde commit daf1b62

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/vue-auth/src/stores/vue-auth.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ axios.defaults.headers.common['Content-Type'] = 'application/json; charset=utf-8
2020
axios.defaults.headers.common['Accept'] = 'application/json'
2121
axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
2222

23-
export function createVueAuthStore<UA = unknown>(storageOptions?: StorageOptions) {
23+
export function createVueAuthStore<UA = unknown>(options?: StorageOptions) {
24+
const storageOptions = Object.fromEntries(
25+
Object.entries(options ?? {}).filter(([key]) => !['plugins', 'skipInit'].includes(key))
26+
)
27+
2428
return defineStore(
2529
'vue-auth',
2630
() => {

0 commit comments

Comments
 (0)