From 20c41d44f088ad20a7cd5a8fde0be94874c21233 Mon Sep 17 00:00:00 2001 From: Samuel Lippert Date: Tue, 14 Nov 2023 19:13:19 -0600 Subject: [PATCH] Not length --- worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker.js b/worker.js index bb6f1eb..2d30400 100644 --- a/worker.js +++ b/worker.js @@ -143,7 +143,7 @@ export class State { if (this.machineDefinition) retval.machine = this.machineDefinition retval.user = user return new Response(JSON.stringify(retval, null, 2), { headers: { 'content-type': 'application/json; charset=utf-8' } }) - } else if ((search && (!this.machineDefinition || isSearchBasedUpdate)) || (method === 'POST' && json?.states?.length)) { + } else if ((search && (!this.machineDefinition || isSearchBasedUpdate)) || (method === 'POST' && json?.states)) { await this.update((search && JSON.parse(decodeURIComponent(search.substring(isSearchBasedUpdate ? update.length : 1)))) || json) } else { if (json) console.log(json)