I’m troubleshooting some output and I noticed if I comment out part of my code, it still runs the code and outputs the value. Sample code with output image:
/** @CustomParams
{
"encodedString": {
"title": "Encoded String",
"key": "encodedString",
"description": "The base64 encoded string to decode",
"type": "string"
}
}
*/
export default async function run({ data }) {
console.log(data);
// Check if the encodedString is provided
// if (!data.encodedString) {
// throw new Error("The 'encodedString' parameter is missing or undefined.");
// }
// const decodedString = Buffer.from(data.encodedString, 'base64').toString('utf-8');
// return { decodedString };
return data;
}
// export default async function run({ data }) {
// // Access the encoded string from the node with ID 9
// const content = data["{{9.`body`.`body`.`content`}}"];
// // Log the content to the console
// console.log("Content:", content);
// // Return the data for debugging purposes
// return { content };
// }
If I delete the second block of commented code, then the second line in the output goes away.