So, here is the question on my screenshot, self-explanatory.
The code must return MSG_CANCELLED variable.
Instead, it returns MSG_WEEKEND variable.
Hi @slishnevsky,
To help you with the issue where your code returns MSG_WEEKEND
instead of MSG_CANCELLED
, I’ll need to see the relevant portion of your code. This will allow me to understand the logic and identify why the wrong variable is being returned.
Could you please provide the code snippet where you define and return these variables? This will help me give you a precise solution.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double-check my answers and code! Learn how to build your own.
export default defineComponent({
async run({ steps }) {
var message = process.env.MSG_SUCCESS;
if(steps.weekend) message = process.env.MSG_WEEKEND;
else if(!steps.upcoming) message = process.env.MSG_CANCELED;
return message;
},
})
steps.weekend = false;
steps.upcoming = false;
if(!steps.upcoming) = if(!false) = if(true), so it should be MSG_CANCELLED.