Skip to content

Scheduling infrastructure for absolutely everyone.

fix: use Object.prototype.hasOwnProperty.call for safe property checks (#27661)

Morgan295058d12349
diff --git a/packages/platform/types/bookings/2024-08-13/inputs/cancel-booking-input.pipe.ts b/packages/platform/types/bookings/2024-08-13/inputs/cancel-booking-input.pipe.ts
index baad69ed016..444d32d6b0c 100644
--- a/packages/platform/types/bookings/2024-08-13/inputs/cancel-booking-input.pipe.ts
+++ b/packages/platform/types/bookings/2024-08-13/inputs/cancel-booking-input.pipe.ts
@@ -77,6 +77,6 @@ export class CancelBookingInputPipe implements PipeTransform {
private isCancelSeatedBookingInput(
value: CancelBookingInput
): value is CancelSeatedBookingInput_2024_08_13 {
- return value.hasOwnProperty("seatUid");
+ return Object.prototype.hasOwnProperty.call(value, "seatUid");
}
}
diff --git a/packages/platform/types/bookings/2024-08-13/inputs/create-booking-input.pipe.ts b/packages/platform/types/bookings/2024-08-13/inputs/create-booking-input.pipe.ts
index ad9665b46df..66a55b395e7 100644
--- a/packages/platform/types/bookings/2024-08-13/inputs/create-booking-input.pipe.ts
+++ b/packages/platform/types/bookings/2024-08-13/inputs/create-booking-input.pipe.ts
@@ -102,10 +102,12 @@ export class CreateBookingInputPipe implements PipeTransform {
private isRecurringBookingInput(
value: CreateBookingInput
): value is CreateRecurringBookingInput_2024_08_13 {
- return value.hasOwnProperty("recurrenceCount");
+ return Object.prototype.hasOwnProperty.call(value, "recurrenceCount");
}
private isInstantBookingInput(value: CreateBookingInput): value is CreateInstantBookingInput_2024_08_13 {
- return value.hasOwnProperty("instant") && "instant" in value && value.instant === true;
+ return (
+ Object.prototype.hasOwnProperty.call(value, "instant") && "instant" in value && value.instant === true
+ );
}
}
diff --git a/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.ts b/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.ts
index 080f08724d1..105a49dbb8b 100644
--- a/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.ts
+++ b/packages/platform/types/slots/slots-2024-09-04/inputs/get-slots-input.pipe.ts
@@ -131,18 +131,24 @@ export class GetSlotsInputPipe implements PipeTransform {
}
private isById(value: GetSlotsInput_2024_09_04): value is ById_2024_09_04 {
- return value.hasOwnProperty("eventTypeId");
+ return Object.prototype.hasOwnProperty.call(value, "eventTypeId");
}
private isByUsernameAndEventTypeSlug(
value: GetSlotsInput_2024_09_04
): value is ByUsernameAndEventTypeSlug_2024_09_04 {
- return value.hasOwnProperty("username") && value.hasOwnProperty("eventTypeSlug");
+ return (
+ Object.prototype.hasOwnProperty.call(value, "username") &&
+ Object.prototype.hasOwnProperty.call(value, "eventTypeSlug")
+ );
}
private isByTeamSlugAndEventTypeSlug(
value: GetSlotsInput_2024_09_04
): value is ByTeamSlugAndEventTypeSlug_2024_09_04 {
- return value.hasOwnProperty("teamSlug") && value.hasOwnProperty("eventTypeSlug");
+ return (
+ Object.prototype.hasOwnProperty.call(value, "teamSlug") &&
+ Object.prototype.hasOwnProperty.call(value, "eventTypeSlug")
+ );
}
}