> Also, in terms of style:
> - Is there a reason you use a grouping parens?
> - Use a triple-equal symbol like !== instead of !=
> - And the if end-line continuation should look like:
>
> if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
> !callManager.hasCalls && !edgeDemo.running) {
> foo...
> }
>
> Or maybe even for better clarity:
>
> if (Powerd.status === Powerd.Off &&
> reason !== Powerd.Proximity &&
> !callManager.hasCalls &&
> !edgeDemo.running) {
> foo...
> }
> Also, in terms of style: hasCalls && !edgeDemo.running) { hasCalls &&
> - Is there a reason you use a grouping parens?
> - Use a triple-equal symbol like !== instead of !=
> - And the if end-line continuation should look like:
>
> if (Powerd.status === Powerd.Off && reason !== Powerd.Proximity &&
> !callManager.
> foo...
> }
>
> Or maybe even for better clarity:
>
> if (Powerd.status === Powerd.Off &&
> reason !== Powerd.Proximity &&
> !callManager.
> !edgeDemo.running) {
> foo...
> }
Good catch. Fixed the style and pushed.