Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit fa568af

Browse files
committed
fix: Don't try and send via flipper if flipper isn't connected
1 parent 530832d commit fa568af

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/flipper-connection-manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ export default class FlipperConnectionManager {
4747

4848
send(payload: any) {
4949
this.baseConnectionManager.send(payload)
50-
this.flipperConnection.send("Command", JSON.parse(payload))
50+
51+
if (this.flipperConnection) {
52+
this.flipperConnection.send("Command", JSON.parse(payload))
53+
}
5154
}
5255

5356
on(event: "open" | "close" | "message", callback: any) {

0 commit comments

Comments
 (0)