Skip to content

Commit

Permalink
common: replace substr with substring
Browse files Browse the repository at this point in the history
alternative to #1098
  • Loading branch information
fippo committed Nov 28, 2022
1 parent f270738 commit 6782162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/common_shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function shimRTCIceCandidate(window) {
if (typeof args === 'object' && args.candidate &&
args.candidate.indexOf('a=') === 0) {
args = JSON.parse(JSON.stringify(args));
args.candidate = args.candidate.substr(2);
args.candidate = args.candidate.substring(2);
}

if (args.candidate && args.candidate.length) {
Expand Down Expand Up @@ -173,7 +173,7 @@ export function shimMaxMessageSize(window, browserDetails) {
const match = SDPUtils.matchPrefix(description.sdp,
'a=max-message-size:');
if (match.length > 0) {
maxMessageSize = parseInt(match[0].substr(19), 10);
maxMessageSize = parseInt(match[0].substring(19), 10);
} else if (browserDetails.browser === 'firefox' &&
remoteIsFirefox !== -1) {
// If the maximum message size is not present in the remote SDP and
Expand Down

0 comments on commit 6782162

Please sign in to comment.