Skip to content

Commit

Permalink
fix: remove redundant normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Sep 9, 2021
1 parent 32307c0 commit 933fb2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Storage } from './types'
import { normalizeBase, normalizeKey } from './_utils'
import { normalizeBase } from './_utils'

const storageKeyProps: (keyof Storage)[] = [
'hasItem',
Expand All @@ -23,7 +23,7 @@ export function prefixStorage (storage: Storage, base: string): Storage {
const nsStorage: Storage = { ...storage }
for (const prop of storageKeyProps) {
// @ts-ignore Better types?
nsStorage[prop] = (key: string = '', ...args) => storage[prop](normalizeKey(base + key), ...args)
nsStorage[prop] = (key: string = '', ...args) => storage[prop](base + key, ...args)
}
return nsStorage
}

0 comments on commit 933fb2c

Please sign in to comment.