borc icon indicating copy to clipboard operation
borc copied to clipboard

Remove one more node global

Open pnlp-dev opened this issue 5 years ago • 1 comments

https://github.com/dignifiedquire/borc/blob/f8b6b7630250e2ee5509f7104529490a388c2cc7/src/decoder.js#L58

Looks like you removed node globals somewhat recently, but you missed one. This global reference is breaking in the latest version of Angular.

pnlp-dev avatar Jul 19 '20 17:07 pnlp-dev

Yup. Me to. As a workaround I dropped global from the call in decoder.js and just pass a zero: 58 this.parser = parser(0, { ... then in decoder.asm.js I switched back to the native functions 8 var heap = new Uint8Array(buffer) //use native Uint8Array instead of stdlib.Uint8Array 50 var pow = Math.pow //use native Math.pow instead of stdlib.Math.pow

Not 100% sure this will continue to work as intended (please advise) but at least it doesn't fall over any more and seems to do something.

AGFlash avatar Nov 27 '20 14:11 AGFlash