Skip to content

Commit

Permalink
BrowserWebSocketClientAdapter: don't throw on unknown message type
Browse files Browse the repository at this point in the history
  • Loading branch information
HerbCaudill committed Nov 8, 2023
1 parent d8334e6 commit 703bfa2
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
JoinMessage,
} from "./messages.js"
import { ProtocolV1 } from "./protocolVersion.js"
import { isValidRepoMessage } from "@automerge/automerge-repo"

const log = debug("WebsocketClient")

Expand Down Expand Up @@ -170,9 +169,6 @@ export class BrowserWebSocketClientAdapter extends WebSocketNetworkAdapter {
log(`error: ${decoded.message}`)
break
default:
if (!isValidRepoMessage(decoded)) {
throw new Error("Invalid message received")
}
this.emit("message", decoded)
}
}
Expand Down

0 comments on commit 703bfa2

Please sign in to comment.