Merge branch 'master' of git://git.onelab.eu/myslice
[myslice.git] / unfold / static / js / unfold-helper.js
index 8d75cc3..67524a1 100644 (file)
@@ -34,7 +34,11 @@ var unfold = {
     },
 
     escape_id: function(id) {
-        return id.replace( /(:|\.|\[|\])/g, "\\$1" );
+        if(typeof id != 'undefined'){
+            return id.replace( /(:|\.|\[|\])/g, "\\$1" );
+        }else{
+            return "fake-id";
+        }
     }
 
 } // global unfold