[backport:1.4] JS cstring null fixes (#16979)

* [backport:1.4] JS cstring null fixes
* fix JS move string
* make it look cleaner
This commit is contained in:
hlaaftana 2021-02-11 19:04:32 +03:00 • committed by GitHub
commit 81533a0014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 8 deletions

View file

@ -645,7 +645,7 @@ proc genericReset(x: JSRef, ti: PNimType): JSRef {.compilerproc.} =
asm "`result` = {m_type: `ti`};"
else:
asm "`result` = {};"
of tySequence, tyOpenArray:
of tySequence, tyOpenArray, tyString:
asm """
`result` = [];
"""