Skip to content

Commit

Permalink
fix infinite loop (#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
eniko.pusztai committed Mar 25, 2021
1 parent 506f70e commit 53a8264
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const DocumentDataProvider: React.FC = ({ children }) => {
version: doc.version,
abortController: ac,
})
if (result.pageCount === PreviewState.Loading) {
if (result.pageCount === PreviewState.Loading && ac.signal.aborted === false) {
setDocumentData(result)
await sleepAsync(POLLING_INTERVAL)
getData()
Expand Down

0 comments on commit 53a8264

Please sign in to comment.