From c8fa7099a0c8583b5b99128bfde996380c9ecf78 Mon Sep 17 00:00:00 2001
From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Tue, 22 Mar 2011 15:59:44 +0000
Subject: [PATCH] have checkILSEvent handle events that aren't in
 ils_events.xml

Signed-off-by: Jason Etheridge <jason@esilibrary.com>


git-svn-id: svn://svn.open-ils.org/ILS/trunk@19852 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/web/opac/common/js/opac_utils.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/web/opac/common/js/opac_utils.js b/Open-ILS/web/opac/common/js/opac_utils.js
index dda49068ec..b699f46fc1 100644
--- a/Open-ILS/web/opac/common/js/opac_utils.js
+++ b/Open-ILS/web/opac/common/js/opac_utils.js
@@ -1043,8 +1043,13 @@ function _timerRun(tname) {
 }
 
 function checkILSEvent(obj) {
-	if( obj && obj.ilsevent != null && obj.ilsevent != 0 )
-		return parseInt(obj.ilsevent);
+	if (obj && typeof obj == 'object' && typeof obj.ilsevent != 'undefined') {
+        if (obj.ilsevent === '') {
+            return true;
+        } else if ( obj.ilsevent != null && obj.ilsevent != 0 ) {
+            return parseInt(obj.ilsevent);
+        }
+    }
 	return null;
 }
 
-- 
2.11.0