Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit d9ce981

Browse files
Replace parameters with variables
1 parent 2cf65f9 commit d9ce981

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,11 @@ interface Options {
2626
assertStorage?: (storage: Storage) => void | Error;
2727
}
2828

29-
export default function (
30-
options?: Options | null,
31-
storage?: Storage | null,
32-
key?: string | null
33-
) {
29+
export default function (options?: Options) {
3430
options = options || {};
35-
storage = options.storage || storage || (window && window.localStorage);
36-
key = options.key || key || "vuex";
31+
32+
const storage = options.storage || (window && window.localStorage);
33+
const key = options.key || "vuex";
3734

3835
function getState(key, storage) {
3936
let value;

0 commit comments

Comments
 (0)