From: erickson Date: Thu, 11 Nov 2010 15:39:59 +0000 (+0000) Subject: wraps tips appendChild in try/catch to prevent occaisonal exeptions. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=61210b9cc365e71736d8b10a0a24643e9bf2d88d;p=evergreen%2Fpines.git wraps tips appendChild in try/catch to prevent occaisonal exeptions. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18702 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/tips.js b/Open-ILS/web/opac/skin/default/js/tips.js index b24985b326..48fa83a539 100644 --- a/Open-ILS/web/opac/skin/default/js/tips.js +++ b/Open-ILS/web/opac/skin/default/js/tips.js @@ -12,7 +12,7 @@ function insertTip () { if (tip_div) { var tips = tip_div.getElementsByTagName('div')[0].getElementsByTagName('span'); var index = Math.floor(Math.random() * tips.length); - tip_div.appendChild( tips[index] ); + try { tip_div.appendChild( tips[index] ); } catch(E) {} removeCSSClass(tip_div, 'hide_me'); } }