Skip to content

Commit a11059c

Browse files
niieanishellscape
authored andcommitted
fix: handle a potential uncaughtException (#113)
1 parent 4b14629 commit a11059c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/routes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ const setupRoutes = function setupRoutes() {
8484
};
8585

8686
socket.progress = (data) => {
87+
if (socket.readyState !== 1) {
88+
return;
89+
}
8790
socket.send(prep({ action: 'progress', data }));
8891
};
8992

0 commit comments

Comments
 (0)