Hi all, This is related to the JS code generated ...
# multiplatform
m
Hi all, This is related to the JS code generated in my multiplatform project. The ktor client gives me
undefined is not an object (evaluating 't.length')
errors when I try to fetch data from a REST endpoint. The problem seems to be related to the buffer module that ktor uses (https://github.com/feross/buffer). It only occurs when using the legacy js backend. Kotlin: 1.4.21 Ktor: 1.5.1 Is anyone familiar with this issue?
I’ve deactivated dce but that didn’t help.
t
Do you use file level constants?
m
Nope, but I am referencing
const val
Strings (header key definitions) which are defined in an
internal object
when creating a request.
t
Looks like known problem of top vals in legacy
m
Thanks for the tip @turansky. I have removed the constants but the issue still persists. Looks like the problem is somewhere else.
t
What about Kotlin
1.4.30
?
m
The same issue 😕