nickbabcock / jomini

Parses Paradox files into javascript objects
MIT License
78 stars 9 forks source link

Fix possibility of double initialization #68

Closed nickbabcock closed 2 years ago

nickbabcock commented 2 years ago

If, for whatever reason, someone had code that looked liked:

const [jomini1, jomini2] = Promise.all([
    Jomini.initialize(),
    Jomini.initialize()
]);

Previously the Wasm would be compiled twice. The fix is to detect if there is compilation in progress.

github-actions[bot] commented 2 years ago

Size Change: +4 B (0%)

Total Size: 95 kB

Filename Size Change
dist/es/index.js 95 kB +4 B (0%)

compressed-size-action