Zhihui-Platform / client

Avoid using console in code that runs on browser JS-0002
Bug risk
Major
a year ago2 years old
Avoid using console in code that runs on the browser
 8
 9function startCreateSlides() {
10  window.zhihui.slides.openCreateSlideWindow();
11  console.log("create");12}
13</script>
14
Avoid using console in code that runs on the browser
88## PAGE 2`;
89  await writeFile(join(dir, "slides.md"), markdownFile);
90  commands.forEach((command) => {
91    console.log(command, dir);92    $(command, {
93      cwd: dir,
94    });
Avoid using console in code that runs on the browser
14  const path = join(tmpdir(), url.split("/").pop());
15  console.log(path);
16  const stream = await fetch(url);
17  console.log(stream.headers);18  const arraybuffer = await stream.arrayBuffer();
19  const buffer = Buffer.from(arraybuffer);
20  await writeFile(path, buffer);
Avoid using console in code that runs on the browser
12  const url = await getDownloadUrl();
13  console.log(url, url.split("/").pop(), tmpdir());
14  const path = join(tmpdir(), url.split("/").pop());
15  console.log(path);16  const stream = await fetch(url);
17  console.log(stream.headers);
18  const arraybuffer = await stream.arrayBuffer();
Avoid using console in code that runs on the browser
10
11export async function downloadBinary() {
12  const url = await getDownloadUrl();
13  console.log(url, url.split("/").pop(), tmpdir());14  const path = join(tmpdir(), url.split("/").pop());
15  console.log(path);
16  const stream = await fetch(url);