From: erickson Date: Thu, 11 Nov 2010 15:40:53 +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=fd60a8b739d750cbe0ee486e5a96238b69a0246c;p=evergreen%2Fjoelewis.git wraps tips appendChild in try/catch to prevent occaisonal exeptions. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@18703 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'); } }