Skip to content

Commit

Permalink
fix: IE10 issue for disableOthers when property access results in "pe…
Browse files Browse the repository at this point in the history
…rmission denied" (#4395)

Fixes #4378
  • Loading branch information
JetLogs authored and gkatsev committed Jun 28, 2017
1 parent e0824c8 commit 7f7ea70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/js/tracks/audio-track-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import document from 'global/document';
*/
const disableOthers = function(list, track) {
for (let i = 0; i < list.length; i++) {
if (track.id === list[i].id) {
if (!Object.keys(list[i]).length || track.id === list[i].id) {
continue;
}
// another audio track is enabled, disable it
Expand Down
2 changes: 1 addition & 1 deletion src/js/tracks/video-track-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import document from 'global/document';
*/
const disableOthers = function(list, track) {
for (let i = 0; i < list.length; i++) {
if (track.id === list[i].id) {
if (!Object.keys(list[i]).length || track.id === list[i].id) {
continue;
}
// another video track is enabled, disable it
Expand Down

0 comments on commit 7f7ea70

Please sign in to comment.