Skip to content

Commit

Permalink
[FIX] ws doc: language switcher in some iOS versions
Browse files Browse the repository at this point in the history
  • Loading branch information
xmo-odoo committed Feb 26, 2015
1 parent 10a1d44 commit e700805
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/_themes/odoodoc/static/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ $(function () {
// programming language switcher
function findSheet(pattern, fromSheet) {
if (fromSheet) {
for(var i=0; i<fromSheet.cssRules.length; ++i) {
var rule = fromSheet.cssRules[i];
// cssRules may be `null` in iOS safari (?)
var rules = fromSheet.cssRules || [];
for(var i=0; i<rules.length; ++i) {
var rule = rules[i];
if (rule.type !== CSSRule.IMPORT_RULE) { continue; }
if (pattern.test(rule.href)) {
return rule.styleSheet;
Expand Down

0 comments on commit e700805

Please sign in to comment.