Update src/helpers/recal-helper.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a831fa6c27
commit
19bf2d0faf
1 changed files with 13 additions and 1 deletions
|
|
@ -78,5 +78,17 @@ export function anyPartWithRequiresRecalFlag(lineItems) {
|
|||
return false;
|
||||
}
|
||||
|
||||
return lineItems.some((li) => li.requiresRecalibration === true);
|
||||
if (Array.isArray(lineItems)) {
|
||||
return lineItems.some((li) => li.requiresRecalibration === true);
|
||||
}
|
||||
|
||||
const flattened = [
|
||||
...(lineItems.glassParts ?? []),
|
||||
...(lineItems.supportingItems ?? []),
|
||||
...(lineItems.otherParts ?? []),
|
||||
...(lineItems.feeItems ?? []),
|
||||
...(lineItems.vaps ?? []),
|
||||
];
|
||||
|
||||
return flattened.some((li) => li.requiresRecalibration === true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue