Skip to content

Commit 9b0910f

Browse files
authored
Merge pull request #131 from accounts-js/feature/fix-issue-with-storage
Fixed a bug where getState returns undefined
2 parents 000d137 + c4d98db commit 9b0910f

File tree

2 files changed

+92
-9
lines changed

2 files changed

+92
-9
lines changed

packages/client/src/accounts-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class AccountsClient {
5353
options: AccountsClientConfiguration,
5454
transport: TransportInterface
5555
) {
56-
this.options = options;
56+
this.options = { ...config, ...options };
5757
this.storage = options.tokenStorage || config.tokenStorage;
5858
if (!transport) {
5959
throw new AccountsError('A REST or GraphQL transport is required');

yarn.lock

Lines changed: 91 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ amdefine@>=0.0.4:
9292
version "1.0.1"
9393
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
9494

95-
ansi-escapes@^1.4.0:
95+
ansi-escapes@^1.1.0, ansi-escapes@^1.4.0:
9696
version "1.4.0"
9797
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
9898

@@ -316,6 +316,14 @@ babel-plugin-transform-strict-mode@^6.24.1:
316316
babel-runtime "^6.22.0"
317317
babel-types "^6.24.1"
318318

319+
320+
version "6.23.0"
321+
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
322+
dependencies:
323+
babel-runtime "^6.22.0"
324+
core-js "^2.4.0"
325+
regenerator-runtime "^0.10.0"
326+
319327
babel-preset-jest@^20.0.3:
320328
version "20.0.3"
321329
resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a"
@@ -484,7 +492,7 @@ center-align@^0.1.1:
484492
align-text "^0.1.3"
485493
lazy-cache "^1.0.3"
486494

487-
chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
495+
chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
488496
version "1.1.3"
489497
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
490498
dependencies:
@@ -502,6 +510,10 @@ chalk@^2.0.0:
502510
escape-string-regexp "^1.0.5"
503511
supports-color "^4.0.0"
504512

513+
chardet@^0.4.0:
514+
version "0.4.2"
515+
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
516+
505517
ci-info@^1.0.0:
506518
version "1.0.0"
507519
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534"
@@ -908,6 +920,12 @@ ecc-jsbn@~0.1.1:
908920
dependencies:
909921
jsbn "~0.1.0"
910922

923+
encoding@^0.1.11:
924+
version "0.1.12"
925+
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
926+
dependencies:
927+
iconv-lite "~0.4.13"
928+
911929
errno@^0.1.4:
912930
version "0.1.4"
913931
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d"
@@ -1001,6 +1019,14 @@ extend@~3.0.0:
10011019
version "3.0.1"
10021020
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
10031021

1022+
external-editor@^2.0.1:
1023+
version "2.1.0"
1024+
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48"
1025+
dependencies:
1026+
chardet "^0.4.0"
1027+
iconv-lite "^0.4.17"
1028+
tmp "^0.0.33"
1029+
10041030
external-editor@^2.0.4:
10051031
version "2.0.4"
10061032
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972"
@@ -1341,6 +1367,10 @@ iconv-lite@^0.4.17:
13411367
version "0.4.18"
13421368
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2"
13431369

1370+
iconv-lite@~0.4.13:
1371+
version "0.4.19"
1372+
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
1373+
13441374
imurmurhash@^0.1.4:
13451375
version "0.1.4"
13461376
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
@@ -1366,6 +1396,24 @@ ini@^1.3.2:
13661396
version "1.3.4"
13671397
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
13681398

1399+
1400+
version "3.0.6"
1401+
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347"
1402+
dependencies:
1403+
ansi-escapes "^1.1.0"
1404+
chalk "^1.0.0"
1405+
cli-cursor "^2.1.0"
1406+
cli-width "^2.0.0"
1407+
external-editor "^2.0.1"
1408+
figures "^2.0.0"
1409+
lodash "^4.3.0"
1410+
mute-stream "0.0.7"
1411+
run-async "^2.2.0"
1412+
rx "^4.1.0"
1413+
string-width "^2.0.0"
1414+
strip-ansi "^3.0.0"
1415+
through "^2.3.6"
1416+
13691417
inquirer@^3.0.6:
13701418
version "3.2.0"
13711419
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.2.0.tgz#45b44c2160c729d7578c54060b3eed94487bb42b"
@@ -1487,7 +1535,7 @@ is-promise@^2.1.0:
14871535
version "2.1.0"
14881536
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
14891537

1490-
is-stream@^1.1.0:
1538+
is-stream@^1.0.1, is-stream@^1.1.0:
14911539
version "1.1.0"
14921540
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
14931541

@@ -2130,14 +2178,14 @@ [email protected]:
21302178
version "0.0.8"
21312179
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
21322180

2181+
[email protected], minimist@^1.1.1, minimist@^1.1.3:
2182+
version "1.2.0"
2183+
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
2184+
21332185
minimist@^0.1.0:
21342186
version "0.1.0"
21352187
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
21362188

2137-
minimist@^1.1.1, minimist@^1.1.3:
2138-
version "1.2.0"
2139-
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
2140-
21412189
minimist@~0.0.1:
21422190
version "0.0.10"
21432191
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
@@ -2172,6 +2220,13 @@ natural-compare@^1.4.0:
21722220
version "1.4.0"
21732221
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
21742222

2223+
2224+
version "1.6.3"
2225+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04"
2226+
dependencies:
2227+
encoding "^0.1.11"
2228+
is-stream "^1.0.1"
2229+
21752230
node-int64@^0.4.0:
21762231
version "0.4.0"
21772232
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
@@ -2257,6 +2312,24 @@ onetime@^2.0.0:
22572312
dependencies:
22582313
mimic-fn "^1.0.0"
22592314

2315+
opencollective@^1.0.3:
2316+
version "1.0.3"
2317+
resolved "https://registry.yarnpkg.com/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1"
2318+
dependencies:
2319+
babel-polyfill "6.23.0"
2320+
chalk "1.1.3"
2321+
inquirer "3.0.6"
2322+
minimist "1.2.0"
2323+
node-fetch "1.6.3"
2324+
opn "4.0.2"
2325+
2326+
2327+
version "4.0.2"
2328+
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
2329+
dependencies:
2330+
object-assign "^4.0.1"
2331+
pinkie-promise "^2.0.0"
2332+
22602333
optimist@^0.6.1:
22612334
version "0.6.1"
22622335
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
@@ -2293,7 +2366,7 @@ os-locale@^2.0.0:
22932366
lcid "^1.0.0"
22942367
mem "^1.1.0"
22952368

2296-
os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1:
2369+
os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2:
22972370
version "1.0.2"
22982371
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
22992372

@@ -2612,6 +2685,10 @@ rx-lite@*, rx-lite@^4.0.8:
26122685
version "4.0.8"
26132686
resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
26142687

2688+
rx@^4.1.0:
2689+
version "4.1.0"
2690+
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
2691+
26152692
safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
26162693
version "5.1.1"
26172694
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
@@ -2907,6 +2984,12 @@ tmp@^0.0.31:
29072984
dependencies:
29082985
os-tmpdir "~1.0.1"
29092986

2987+
tmp@^0.0.33:
2988+
version "0.0.33"
2989+
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
2990+
dependencies:
2991+
os-tmpdir "~1.0.2"
2992+
29102993
29112994
version "1.0.4"
29122995
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"

0 commit comments

Comments
 (0)