On Fri, 20 May 2016 06:29:57 -0700 (PDT), helixpoint@gmail.com wrote:
> On Friday, May 20, 2016 at 7:45:35 AM UTC-4, helix...@gmail.com wrote:
>> This is the line. Can't I use...&& to stop this from returning null
>>
>> return (E.Util.ieVersion() < 9 ? a.caller : a.caller.caller);
>>
>> I know this is wrong, but something like....
>>
>> return (E.Util.ieVersion() < 9 ? &&a.caller : &&a.caller.caller);
>
> If both object are null in the ternary, I get an error because it is looking for a true or false returned. If it is null, I need to return true
If it needs to return a boolean type based on whether the function caller
are null or non null, use this:
return !!(E.Util.ieVersion() < 9 ? a.caller : a.caller.caller);