From 60739c7853ce611a12227887f1a115f75e957d8e Mon Sep 17 00:00:00 2001 From: Milli Date: Sat, 28 May 2022 01:06:49 +0200 Subject: [PATCH] Added comments for leading semicolons --- functions/src/create-contract.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/create-contract.ts b/functions/src/create-contract.ts index b7104197..40035440 100644 --- a/functions/src/create-contract.ts +++ b/functions/src/create-contract.ts @@ -71,11 +71,11 @@ export const createContract = newEndpoint(['POST'], async (req, [user, _]) => { let min, max, initialProb if (outcomeType === 'NUMERIC') { - ;({ min, max } = validate(numericSchema, req.body)) + ;({ min, max } = validate(numericSchema, req.body)) // leading ; intentional: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#assignment_separate_from_declaration_2 if (max - min <= 0.01) throw new APIError(400, 'Invalid range.') } if (outcomeType === 'BINARY') { - ;({ initialProb } = validate(binarySchema, req.body)) + ;({ initialProb } = validate(binarySchema, req.body)) // leading ; intentional: see abive } // Uses utc time on server: