Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix: passing custom queries to the request
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Sep 1, 2022
1 parent 54b5a92 commit 8391f6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/composables/usePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ export function usePage(path, query = {}) {
const isCached = hasPage(id, query);
// Get page from cache or freshly fetch it
const data = await getPage(id, {
...query,
...(token ? { token } : {}),
query: {
...query,
...(token ? { token } : {}),
},
});

if (!data) {
Expand Down

0 comments on commit 8391f6c

Please sign in to comment.