From 58822f8ea1df305696c5f65161896f448c5eaf7b Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:49:51 -0400 Subject: [PATCH] Use Number() instead of tertinary operator --- functions/api/mod-queue/list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/api/mod-queue/list.ts b/functions/api/mod-queue/list.ts index 05cf32c..0e77cdb 100644 --- a/functions/api/mod-queue/list.ts +++ b/functions/api/mod-queue/list.ts @@ -51,7 +51,7 @@ export async function onRequestGet(context: RequestContext) { await context.env.D1.prepare( "SELECT created_at, id FROM ? WHERE created_at < ? AND open = ? ORDER BY created_at DESC LIMIT 25;" ) - .bind(table, before, showClosed ? 0 : 1) + .bind(table, before, Number(showClosed)) .all(); if (results)