diff --git a/src/screens/dashboard.js b/src/screens/dashboard.js index 3dbb4bc..e21bb81 100644 --- a/src/screens/dashboard.js +++ b/src/screens/dashboard.js @@ -63,8 +63,16 @@ function DashboardScreen() { const error = habitsError || checkmarksError; + /** + * Temporary fix + * + * Cancelled query is throwing `CancelledError`. In V3 cancellation will not throw an error anymore. + * https://github.com/tannerlinsley/react-query/discussions/1179 + */ + const isCancelledError = checkmarksError && checkmarksError.hasOwnProperty('silent'); + // Ignore cancelled errors - if (error && checkmarksError.constructor.name !== 'CancelledError') { + if (error && !isCancelledError) { return ; }