ming 3 tahun lalu
induk
melakukan
d4062d37c8
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      api/static/script_util.js

+ 4 - 1
api/static/script_util.js

@@ -17,7 +17,10 @@ function get_script() {
     if (xhr.readyState === 4) {
         console.log(xhr.status);
         console.log(xhr.responseText);
-        dataArr = xhr.responseText.split(',');
+        replaced = xhr.responseText.replace('"','');
+        replaced = replaced.replace('[','');
+        replaced = replaced.replace(']','');
+        dataArr = replaced.split(',');
         putscript();
     }};
   var data = `{"name_hash": `+name_hash+`}`;