package uk.me.graphe.client;

public class Console {
    public static native void log(String arg) /*-{
        console.log(arg);
    }-*/;
}

@@ -96,17 +96,92 @@
 rg) /*-%7B
+      
 %0A
+        if(typeof(console) !== 'undefined' && console != null) %7B%0A    
         
@@ -198,16 +198,26 @@
 g(arg);%0A
+        %7D%0A
     %7D-*/

make it work when no console is open