Skip to content

Commit

Permalink
Merge pull request #357 from NYPL/main
Browse files Browse the repository at this point in the history
Merge main into qa
  • Loading branch information
dgcohen authored Oct 10, 2024
2 parents 014829d + e75e121 commit 96827b8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/types/bibDetailsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface LinkedBibDetail {

export interface BibDetailURL {
url: string
urlLabel: string
urlLabel?: string
}

export interface FieldMapping {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/bibUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 4 additions & 3 deletions styles/components/ItemTable.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 96827b8

Please sign in to comment.