have checkILSEvent handle events that aren't in ils_events.xml
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Mar 2011 15:59:44 +0000 (15:59 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 22 Mar 2011 15:59:44 +0000 (15:59 +0000)
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

index dda4906..b699f46 100644 (file)
@@ -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;
 }