throwing error when we encounter NaN
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Jan 2006 17:00:44 +0000 (17:00 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 12 Jan 2006 17:00:44 +0000 (17:00 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2698 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/JSON.js

index e52a439..1f7b805 100644 (file)
@@ -121,6 +121,7 @@ function _js2JSON(arg) {
        
                        case 'unknown':
                        case 'number':
+                               if( isNaN(arg) ) throw "JSON.js encountered NaN in js2JSON()";
                                return arg;
        
                        case 'undefined':