shawenguan hace 1 año
padre
commit
ca19cdfe9b
Se han modificado 1 ficheros con 8 adiciones y 4 borrados
  1. 8 4
      Scripts/unicom/unicomDebug.js

+ 8 - 4
Scripts/unicom/unicomDebug.js

@@ -11,8 +11,12 @@ hostname = img.client.10010.com
 */
 
 let body = $response.body;
+console.log(body);
+if (body) {
+    let injectionStr = `<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>\n<script>var vConsole = new window.VConsole();</script>`;
+    body = body.replace(/<\/body>/i, injectionStr + "</body>");
 
-let injectionStr = `<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>\n<script>var vConsole = new window.VConsole();</script>`;
-body = body.replace(/<\/body>/i, injectionStr + "</body>");
-
-$done({ body: body })
+    $done({ body: body });
+} else {
+    $done({});
+}