Skip to content

Commit

Permalink
Not length
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-lippert committed Nov 15, 2023
1 parent b8e14d7 commit 20c41d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 20c41d4

Please sign in to comment.