mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Fix search bar crashing if remarks on item instance is null
This commit is contained in:
parent
6f2fb3900e
commit
18308d5055
1 changed files with 8 additions and 6 deletions
|
@ -146,12 +146,14 @@ export default function EquipmentInstancesListPage() {
|
|||
.toLowerCase()
|
||||
.includes(filter.toLowerCase()) ||
|
||||
equipment.remarks
|
||||
.toLowerCase()
|
||||
.includes(filter.toLowerCase()) ||
|
||||
equipment.last_updated
|
||||
.toLowerCase()
|
||||
.includes(filter.toLowerCase()) ||
|
||||
equipment.status.toLowerCase() == filter.toLowerCase()
|
||||
? equipment.remarks
|
||||
.toLowerCase()
|
||||
.includes(filter.toLowerCase())
|
||||
: false ||
|
||||
equipment.last_updated
|
||||
.toLowerCase()
|
||||
.includes(filter?.toLowerCase()) ||
|
||||
equipment.status.toLowerCase() == filter.toLowerCase()
|
||||
: // If filter keyword is null then we just pass through everything as if we did not filter at all
|
||||
true
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue