Skip to content
Browse files

Small fix to avoid JS crashes

  • Loading branch information...
1 parent 4c31f0c commit fa6a3eec8c0b72f8306d418cd5fc5f8c9dcbb275 @Roendal Roendal committed
Showing with 6 additions and 4 deletions.
  1. +6 −4 presence/app/assets/javascripts/presence_videochat.js.erb
View
10 presence/app/assets/javascripts/presence_videochat.js.erb
@@ -315,10 +315,12 @@ function checkVideocallFeature(){
var ss = document.styleSheets;
for (var i=0; i<ss.length; i++) {
var rules = ss[i].cssRules || ss[i].rules;
- for (var j=0; j<rules.length; j++) {
- if (rules[j].selectorText === ".chat-videothick") {
- rules[j].style.display = 'none'
- }
+ if (rules != undefined){
+ for (var j=0; j<rules.length; j++) {
+ if (rules[j].selectorText === ".chat-videothick") {
+ rules[j].style.display = 'none'
+ }
+ }
}
}
}

0 comments on commit fa6a3ee

Please sign in to comment.
Something went wrong with that request. Please try again.