Skip to content

Commit

Permalink
bugfix js import
Browse files Browse the repository at this point in the history
  • Loading branch information
kuyoonjo committed Oct 21, 2024
1 parent 24e3a32 commit 5b17b64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/IOSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import type { IGenerator, IParser } from "./IO";
import { ContextMenu } from "./contextMenu";
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
import { Buffer } from 'buffer';
export let id: string;
export let input = "";
Expand Down Expand Up @@ -64,7 +65,7 @@
}
}
async function parseGeneratorJs(str: string) {
var b64 = "data:text/javascript," + str;
const b64 = "data:text/javascript;base64," + Buffer.from(str).toString("base64");
const m: (typeof defaultGenerators)[number] = await import(b64);
console.log(m);
const item: (typeof defaultGenerators)[number] = {
Expand Down

0 comments on commit 5b17b64

Please sign in to comment.