We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb6ba51 commit 7eb37e2Copy full SHA for 7eb37e2
1 file changed
packages/features/bookings/lib/get-booking.ts
@@ -230,9 +230,7 @@ export const getMultipleDurationValue = (
230
queryDuration: string | string[] | undefined,
231
defaultValue: number
232
) => {
233
- return multipleDurationConfig
234
- ? multipleDurationConfig.includes(Number(queryDuration))
235
- ? Number(queryDuration)
236
- : defaultValue
237
- : null;
+ if (!multipleDurationConfig) return null;
+ if (multipleDurationConfig.includes(Number(queryDuration))) return Number(queryDuration);
+ return defaultValue;
238
};
0 commit comments