Skip to content

Commit

Permalink
fix: check transportLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
asdocoder committed Jun 25, 2024
1 parent 5bab43c commit a6ee431
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Ros.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class Ros extends EventEmitter {
* @param {WebSocket} socket
*/
attachSocket(socket) {
if (this.transportLibrary.constructor.name === 'websocket') {
if (this.transportLibrary === 'websocket') {
socket.binaryType = 'arraybuffer';
this.socket = Object.assign(socket, socketAdapter(this));
} else {
Expand Down

0 comments on commit a6ee431

Please sign in to comment.