As there is little in an E-Cigarette that can harm you, second-hand vaping is by far and away the better choice between 2nd hand cigarette smoke and vapour.
It’s important to note that vapour won’t be as good for you as breathing in fresh air (nothing is), but if you compare 2nd hand vapour and passive smoke vaping is clearly much better.