diff --git a/src/amqp-websocket-client.ts b/src/amqp-websocket-client.ts index 64eb7c5..2bca313 100644 --- a/src/amqp-websocket-client.ts +++ b/src/amqp-websocket-client.ts @@ -144,8 +144,8 @@ export class AMQPWebSocketClient extends AMQPBaseClient { } static platform(): string { - if (typeof(window) !== 'undefined') - return window.navigator.userAgent + if (typeof(navigator) !== 'undefined') + return navigator.userAgent else return `${process.release.name} ${process.version} ${process.platform} ${process.arch}` }