Null coalesce 2

This commit is contained in:
Chloe Herd 2023-07-12 09:53:54 -04:00
parent 56521c2744
commit 1261cb1c00

View file

@ -26,11 +26,11 @@ export function getVapsLineItems(availableLineItems, vapTypes) {
}
export function containsGlassPieceWithLocation(locationToFind, glassPiecesToSearch) {
const glassLocationMatches = glassPiecesToSearch.filter(
const glassLocationMatches = glassPiecesToSearch?.filter(
(glassPiece) => glassPiece.glassLocation.toUpperCase() === locationToFind.toUpperCase()
);
return !!glassLocationMatches.length;
return !!glassLocationMatches?.length;
}
export function getAvailablePackages(glassToReplace, availableLineItems, isRepair) {