mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 09:39:08 -05:00
fix(cli): fix WebSocket close (#8776)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
parent
d6c05b09dd
commit
7f8b44a60d
1 changed files with 1 additions and 1 deletions
|
@ -256,7 +256,7 @@
|
|||
}
|
||||
|
||||
close(code, reason) {
|
||||
if (code && (code !== 1000 && !(3000 <= code > 5000))) {
|
||||
if (code && !(code === 1000 || (3000 <= code && code < 5000))) {
|
||||
throw new DOMException(
|
||||
"The close code must be either 1000 or in the range of 3000 to 4999.",
|
||||
"NotSupportedError",
|
||||
|
|
Loading…
Reference in a new issue