Skip to content

Commit

Permalink
fix(#1733): fix reading property trim of nullish label
Browse files Browse the repository at this point in the history
  • Loading branch information
MSzalowski committed Aug 26, 2024
1 parent 7070f12 commit 62abcd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ changes.
### Fixed

- Fix typescript bug leading to runtime error when entering Governance Action details page via direct link [Issue 1801](https://github.com/IntersectMBO/govtool/issues/1801)
- Fix reading trim of null object [Issue 1733](https://github.com/IntersectMBO/govtool/issues/1733)

### Changed

Expand Down
4 changes: 2 additions & 2 deletions govtool/frontend/src/utils/testIdFromLabel.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const testIdFromLabel = (label: string) =>
label.trim().replace(/ /g, "-").toLocaleLowerCase();
export const testIdFromLabel = (label?: string) =>
label?.trim().replace(/ /g, "-").toLocaleLowerCase();

0 comments on commit 62abcd4

Please sign in to comment.