-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiled JS failing when ran with Bunjs #8
Comments
Wondering if this is a KotlinJS bug or not as a ByteArray should register as a UInt8Array |
It still breaks when run with Bunjs. Removing the code below fixes it. if (_get_isNode__xss3j(Companion_getInstance())) {
_get_crypto__fwud1y(Companion_getInstance()).randomFillSync(array);
} else {
} Leaving just the code below allows it to run. var offset = 0;
while (offset < bytes.length) {
var len = bytes.length > 65536 ? 65536 : bytes.length;
_get_crypto__fwud1y(Companion_getInstance()).getRandomValues(array.subarray(offset, offset + len | 0));
offset = offset + len | 0;
} |
What version of
|
#14 is up with a published SNAPSHOT. Could you test it out to verify the fix?
|
@05nelsonm Confirmed. Thanks for the fix. |
Great, will merge the fix and get a release out in a moment |
Reproduction Steps:
gradle browserWebpack
build/compileSync/js/main/productionExecutable/kotlin
into a NodeJS project.Note: Additionally, using the compiled Webpack also causes the same bug when running on NodeJS.
Work around: Delete the first if-statement and leave whatever was in the else statement.
The text was updated successfully, but these errors were encountered: