Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,11 @@ describe('documentQuerySlice', function () {
});

describe('isBasicQuery', function () {
it('returns true when query is undefined', function () {
const state = { ...initialState, query: undefined };
expect(isBasicQuery(state)).to.be.true;
});

it('returns true when query is null', function () {
const state = { ...initialState, query: null };
expect(isBasicQuery(state)).to.be.true;
Expand Down
2 changes: 1 addition & 1 deletion src/views/data-browsing-app/store/documentQuerySlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const DEFAULT_ITEMS_PER_PAGE = 10;
export const isBasicQuery = (
state: any,
): state is DocumentQueryState & { query: null } => {
Comment thread
lerouxb marked this conversation as resolved.
return state.query === null;
return state.query === null || state.query === undefined;
Comment thread
lerouxb marked this conversation as resolved.
Outdated
};

const recalculatePaginationValues = (
Expand Down
Loading