Skip to content

Commit

Permalink
feat: avoid build if WASM is not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
sidwebworks committed Jun 10, 2022
1 parent d41d730 commit 2bfbe2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/store/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const BUNDLE_CODE = createAsyncThunk<string, BuildInput["tree"]>(
async (tree, { dispatch, getState }) => {
const isInitialized = (getState() as RootState).bundler.isInitialized;

if (!Object.keys(tree).length || !isInitialized) return;
if (!isInitialized) return;

if (!Object.keys(tree).length) return;

const entry = Object.keys(tree).find((e) =>
isEntryName(e.replace("/", ""))
Expand Down

1 comment on commit 2bfbe2f

@vercel
Copy link

@vercel vercel bot commented on 2bfbe2f Jun 10, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

web-pen – ./

web-pen-git-master-sidwebworks.vercel.app
web-pen-sidwebworks.vercel.app
web-pen.vercel.app

Please sign in to comment.