Hi friends, I’m loving the Supabase plugin. (Thank you, WeWeb team.)
Here’s my workflow to validate a property returned from a Supabase custom function.
In this case, if the user is not onboarded, I will redirect them to the appropriate page.
Question: Is using JavaScript in the WeWeb workflow the best way to determine the truthiness of an object or parameter?
return context.workflow['a15586d6-d6c4-4733-8bae-95736e642b7e']?.result || false;
There will be cases where I want to know if an array has any values so I can do something like this:
return context.workflow['ae4d4a35-10f9-44c1-97a9-3daa2b43d7ec']?.result?.length > 0 || false;
Thank you!