diff --git a/CHANGELOG b/CHANGELOG index 890760296..c2b8f2aea 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.3] 2024-10-10 + +### Fixed + +- Add optional chaining to value in isRtl util to fix 500 error when bib detail url is missing a label (SCC-4308) +- Adjust ItemTable CSS to make columns the same width in search results (SCC-4299) + ## [1.3.2] 2024-10-7 ### Fixed diff --git a/src/types/bibDetailsTypes.ts b/src/types/bibDetailsTypes.ts index ed7453e82..0f55d62b9 100644 --- a/src/types/bibDetailsTypes.ts +++ b/src/types/bibDetailsTypes.ts @@ -23,7 +23,7 @@ export interface LinkedBibDetail { export interface BibDetailURL { url: string - urlLabel: string + urlLabel?: string } export interface FieldMapping { diff --git a/src/utils/bibUtils.ts b/src/utils/bibUtils.ts index 17174cd5a..c23180e4b 100644 --- a/src/utils/bibUtils.ts +++ b/src/utils/bibUtils.ts @@ -33,7 +33,7 @@ export const rtlOrLtr = (value: string) => { // The "\u200F" right-to-left mark is found at the beginning of fields known // to be written in a script that reads from right to left -const isRtl = (value: string) => value.substring(0, 1) === "\u200F" +const isRtl = (value: string): boolean => value?.substring(0, 1) === "\u200F" export const isItTheLastElement = (i, array) => !(i < array.length - 1) diff --git a/styles/components/ItemTable.module.scss b/styles/components/ItemTable.module.scss index 57ec2a77d..9d0285302 100644 --- a/styles/components/ItemTable.module.scss +++ b/styles/components/ItemTable.module.scss @@ -25,15 +25,16 @@ &.inSearchResult { margin-top: 0; + width: fit-content; tr { border: 0 !important; th, - td, - th:first-of-type, - td:first-of-type { + td { padding-top: 0; + padding-left: 0; + box-sizing: border-box; } } }