Commits

Anonymous committed 87276a0

processing null values properly

  • Participants
  • Parent commits 51100ff

Comments (0)

Files changed (1)

htraf/js/htraf.widgets.js

 function escape(obj, noQuotes) {
     var quote = noQuotes ? '':"'";
     function _escape(obj) {
-        if(obj instanceof Array) {
+        if(obj === null || obj === undefined)
+            return 'null()';
+        else if(obj instanceof Array) {
             return '[' + obj.map(function(item) {
                 return _escape(item);
             }).join(',') + ']'