From: Alan Knowles Date: Fri, 13 Jul 2018 03:47:58 +0000 (+0800) Subject: domains/remove_print_css.js X-Git-Url: http://git.roojs.org/?p=app.webkitpdf;a=commitdiff_plain;h=6d6cb84a885a8451e33b64bed99ad3a82a13efe6 domains/remove_print_css.js --- diff --git a/domains/remove_print_css.js b/domains/remove_print_css.js index 990dd0f..ac136ce 100644 --- a/domains/remove_print_css.js +++ b/domains/remove_print_css.js @@ -20,8 +20,12 @@ } // now we are dealing with non-print styles... - - var ar = document.styleSheets[ss].rules; + try { + var ar = document.styleSheets[ss].rules; + } catch(e) { + console.log("could not access stylesheet:" + ss); + continue; + } if (!ar) { del.push(node); continue;