fix: code node garbled in Javascript (#4615)

This commit is contained in:
Yeuoly 2024-05-23 17:18:57 +08:00 committed by GitHub
parent 11642192d1
commit 5893ebec55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,7 +12,7 @@ class NodeJsTemplateTransformer(TemplateTransformer):
{cls._code_placeholder}
// decode and prepare input object
var inputs_obj = JSON.parse(atob('{cls._inputs_placeholder}'))
var inputs_obj = JSON.parse(Buffer.from('{cls._inputs_placeholder}', 'base64').toString('utf-8'))
// execute main function
var output_obj = main(inputs_obj)