Skip to content

Commit

Permalink
Fix returning null from commands
Browse files Browse the repository at this point in the history
We want returning null to map onto an empty result. We could
do this explicitly per command, but it's less verbose to just
allow null at the top level.
  • Loading branch information
jgraham committed Jan 4, 2023
1 parent fa58031 commit 4e586f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,8 @@ To <dfn>handle an incoming message</dfn> given a [=WebSocket connection=]

1. Let |value| be |result|'s data.

1. If |value| is null, set |value| to an empty map.

1. Assert: |value| matches the definition for the [=result type=]
corresponding to the command with [=command name=] |method|.

Expand Down

0 comments on commit 4e586f9

Please sign in to comment.