Skip to content

Commit

Permalink
cern maps: hide if wrong value is populated
Browse files Browse the repository at this point in the history
  • Loading branch information
kpsherva committed Jun 11, 2024
1 parent f9ab820 commit 9c4e17a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ export class DocumentCirculationExtras extends React.Component {
}

const shelfNumber = getLoanableItemShelf(onShelf);
if (shelfNumber === null || shelfNumber === undefined) {
if (
shelfNumber === null ||
shelfNumber === undefined ||
isNaN(parseInt(shelfNumber))
) {
// If no item can be loaned, don't display the cernmaps iframe
return null;
}
Expand Down

0 comments on commit 9c4e17a

Please sign in to comment.