Skip to content

Commit

Permalink
fix: small bugs again
Browse files Browse the repository at this point in the history
  • Loading branch information
okikio authored Nov 15, 2021
1 parent 85da1f5 commit 19dc355
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ window.addEventListener(
{ passive: true }
);

let oldShareURL = new URL(String(document.location));
try {
const app = new App();

Expand Down Expand Up @@ -68,7 +69,6 @@ try {
.set("Router", new Router())
.add(new PJAX());

let oldShareURL = new URL(String(document.location));
let indexRun = async () => {
const { default: index } = await import("./index");
index(oldShareURL, app);
Expand Down
2 changes: 1 addition & 1 deletion src/ts/modules/monaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export const build = (oldShareURL: URL) => {
[
'// Click Run for the Bundled + Minified + Gzipped package size',
'export * from "@okikio/animate";',
].join("")
].join("\n")

let inputEl = document.querySelector(".app#input #editor") as HTMLElement;
let outputEl = document.querySelector(".app#output #editor") as HTMLElement;
Expand Down
2 changes: 1 addition & 1 deletion src/ts/workers/ts-worker-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const worker: CustomTSWebWorkerFactory = (TypeScriptWorker) => {

let url = new URL(self.location.origin.toString());
if (modules.length > 0) url.searchParams.set("q", modules);
if (treeshake.length > 0)
if (treeshake.replace(/\[\*\]|\,/g, "").length > 0)
url.searchParams.set("treeshake", treeshake);

// If there is any remaining code convert it to a share URL
Expand Down

1 comment on commit 19dc355

@vercel
Copy link

@vercel vercel bot commented on 19dc355 Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.