Skip to content

Commit

Permalink
Fix patch version in unpkg url
Browse files Browse the repository at this point in the history
  • Loading branch information
gudzpoz authored Oct 31, 2023
1 parent fb6bf29 commit b97ec5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default class LuaFactory {
(typeof self === 'object' && self?.constructor?.name === 'DedicatedWorkerGlobalScope')

if (isBrowser) {
const majorminor = version.slice(0, version.lastIndexOf('.'))
customWasmUri = `https://unpkg.com/wasmoon@${majorminor}/dist/glue.wasm`
const stem = /^(\d+\.\d+(?:\.\d+)?)/.exec(version)
customWasmUri = `https://unpkg.com/wasmoon@${stem ? stem[1] : version}/dist/glue.wasm`
}
}

Expand Down

0 comments on commit b97ec5a

Please sign in to comment.