I have this code and I would like to be able to write this in a single line of code. Would that be possible?
If the component returns elements, return these elements from the parent component. Otherwise, do not return at all, but continue the script.
...const c = someComponent(var);if (c) return c;...
Edit
The purpose is that I want to make the code look cleaner, so ideally I would want it to look like this, where this function potentially replaces the output of the parent component and stops further execution.
...checkSomeVariables(var1, var2);...