20377: Treat NaN page as page 0 when checking whether to reject dataexplorere page...
authorStephen Smith <stephen@curii.com>
Thu, 11 May 2023 17:12:44 +0000 (13:12 -0400)
committerStephen Smith <stephen@curii.com>
Thu, 11 May 2023 17:12:44 +0000 (13:12 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/data-explorer/data-explorer-reducer.ts

index 509fe054ff825de8a3ace98bb334e6791fad4445..a0a7eb6400b1160f0702d2e4243b94912c85bfa1 100644 (file)
@@ -74,12 +74,13 @@ export const dataExplorerReducer = (
             update(state, id, (explorer) => {
                 // Reject updates to pages other than current,
                 //  DataExplorer middleware should retry
-                if (explorer.page === page) {
+                const updatedPage = page || 0;
+                if (explorer.page === updatedPage) {
                     return {
                         ...explorer,
                         items,
                         itemsAvailable,
-                        page: page || 0,
+                        page: updatedPage,
                         rowsPerPage,
                     }
                 } else {