Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kzalys committed Nov 11, 2018
2 parents b898e17 + e7c1e27 commit e02f6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/hardwareLibrary/hardwareItemValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export const getAllHardwareItems = async (userId?: number): Promise<Object[]> =>
let remainingItemCount: number = item.totalStock - (item.reservedStock + item.takenStock);
let reservationForItem = userReservations.find(reservation => reservation.hardwareItem.name === item.name);

if (reservationForItem && !reservationForItem.isReserved && !isReservationValid(reservationForItem.reservationExpiry)) {
if (reservationForItem && reservationForItem.isReserved && !isReservationValid(reservationForItem.reservationExpiry)) {
remainingItemCount += reservationForItem.reservationQuantity;
await deleteReservation(reservationForItem.reservationToken);
reservationForItem = undefined;
Expand Down

0 comments on commit e02f6ed

Please sign in to comment.