Skip to content

Commit

Permalink
Merge pull request #9296 from weseek/fix/show-old-revision
Browse files Browse the repository at this point in the history
fix: Couln't show old revision
  • Loading branch information
mergify[bot] authored Oct 23, 2024
2 parents e36cd8c + 5525e11 commit d27db0e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/app/src/stores/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ export const useSWRMUTxCurrentPage = (): SWRMutationResponse<IPagePopulatedToSho
return useSWRMutation(
key,
() => apiv3Get<{ page: IPagePopulatedToShowRevision }>('/page', { pageId: currentPageId, shareLinkId, revisionId })
.then(result => result.data.page)
.then((result) => {
const newData = result.data.page;

// for the issue https://redmine.weseek.co.jp/issues/156150
mutate('currentPage', newData, false);

return newData;
})
.catch(getPageApiErrorHandler),
{
populateCache: true,
Expand Down

0 comments on commit d27db0e

Please sign in to comment.