Skip to content

Commit f2d17df

Browse files
committed
fix(fetch-store): call /stores/me when authenticated
1 parent bf12535 commit f2d17df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/methods/fetch-store.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ecomAuth.fetchStore().then(store => {
1919
*/
2020

2121
export default (args, mustSkipSession) => {
22-
const [, session] = args
23-
const url = `/stores/${session.store_id}.json`
22+
const [{ checkLogin }, session] = args
23+
const url = `/stores/${(checkLogin ? 'me' : session.store_id)}.json`
2424
return fetchAndCache(args, url, mustSkipSession, 'store')
2525
}

0 commit comments

Comments
 (0)