Skip to content

Commit

Permalink
fix: fixed dependency array not having variables that require init (#…
Browse files Browse the repository at this point in the history
…1096)

* fix: fixed dependency array not having variables that require init

* fix: fixing comment tests failing if only one comment is written
  • Loading branch information
arpargo authored Nov 26, 2024
1 parent 25a49bb commit 5aee858
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion e2e/tests/pages/hearing.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test.describe('Hearing', () => {
});

test('should display comment count', async () => {
await expect(page.getByTestId('comment-summary')).toContainText(`Yhteensä ${hearing.n_comments} kommenttia`);
await expect(page.getByTestId('comment-summary')).toContainText(`Yhteensä ${hearing.n_comments} kommentti`);
});

test('should have Swedish link if available', async () => {
Expand Down
3 changes: 2 additions & 1 deletion src/components/admin/HearingEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const HearingEditor = (props) => {
setShouldSubmit(false);
}
}
}, [shouldSubmit, editorErrors, errors, editorIsSaving, hearing.slug, language, navigate]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [shouldSubmit, editorErrors, errors, editorIsSaving, language, navigate]);


/**
Expand Down

0 comments on commit 5aee858

Please sign in to comment.