Add rewrite test as method to vc

Change-Id: I87ac48fdbf9d4c75ce09c4456460d1ede56b9034
diff --git a/dev/js/src/vc/doc.js b/dev/js/src/vc/doc.js
index 7c4f98a..2d38b56 100644
--- a/dev/js/src/vc/doc.js
+++ b/dev/js/src/vc/doc.js
@@ -42,6 +42,7 @@
 
       if (obj === undefined) {
         console.log(json);
+        return;
       };
 
       // Bind the parent