Skip to content

Commit

Permalink
fix(fetch-store): call /stores/me when authenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Feb 12, 2021
1 parent bf12535 commit f2d17df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/methods/fetch-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ecomAuth.fetchStore().then(store => {
*/

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

0 comments on commit f2d17df

Please sign in to comment.