Skip to content

Commit

Permalink
Fix wasm initialize function
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpapercut committed May 3, 2024
1 parent 409cd71 commit fbc3519
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions wypst.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,25 @@ function renderToString(expression, options) {
return markup;
}

function initialize() {
init(wasm);
}

function debug() {
console.log(wasm.slice(10, 100));
async function initialize(path) {
if (path) {
await init(path);
} else {
await init(wasm);
}
}

export default {
render,
renderToString,
parseTree,
init,
__typstContentTree: typstContentTree,
initialize,
};

export {
render,
renderToString,
parseTree,
init,
initialize,
debug,
};

0 comments on commit fbc3519

Please sign in to comment.