Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Bug Fixes
---------

- Fixed a bug where getStats was throwing a TypeError in Electron 3.x. (JSDK-2267)
- Fixed a bug where getStats was throwing a TypeError in non-Chrome environments

3.2.0 (January 7, 2019)
=======================
Expand Down
5 changes: 3 additions & 2 deletions lib/getstats.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ var isFirefox = guess === 'firefox';
var isSafari = guess === 'safari';
var sdpFormat = getSdpFormat();

var chromeMajorVersion = isChrome
? parseInt(navigator.userAgent.match(/Chrome\/([0-9]+)/)[1], 10)
var userAgentParts = navigator.userAgent.match(/Chrome\/([0-9]+)/);
var chromeMajorVersion = isChrome && Array.isArray(userAgentParts)
? parseInt(userAgentParts[1], 10)
: null;

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@twilio/webrtc",
"version": "3.2.1-dev",
"version": "3.2.2-dev",
"description": "WebRTC-related APIs and shims used by twilio-video.js",
"scripts": {
"build": "npm-run-all clean lint test",
Expand Down