Skip to content

Commit

Permalink
UIBULKED-403 Plugin wasn't called when switching between tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Feb 2, 2024
1 parent 397505a commit 0587f58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/api/useRecordTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQuery } from 'react-query';

const ENTITY_TYPE_KEY = 'entityType';

export const useRecordTypes = ({ enabled }) => {
export const useRecordTypes = ({ enabled } = {}) => {
const ky = useOkapiKy();
const { data, isLoading, error } = useQuery({
queryKey: [ENTITY_TYPE_KEY],
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/api/useRecordTypes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('useRecordTypes', () => {

let result;
await act(async () => {
result = renderHook(() => useRecordTypes()).result;
result = renderHook(() => useRecordTypes({ enabled: true })).result;
});

expect(result.current.recordTypes).toEqual([
Expand Down

0 comments on commit 0587f58

Please sign in to comment.