On Mon, May 11, 2009 at 11:35 AM, <[email protected]> wrote: > I tried that initially (return o && ...), but managed to get null > returned. Turns out js (at least on WebKit) will coerce the (o) > expression to a boolean context for the comparison, then proceed to > return it uncoerced if it early-outs the boolean expression. Weird, eh? >
You wouldn't want o || "x" to return true, so that seems correct there, and it doesn't seem much of a stretch to say null/undef should be returned as-is from o && ... -- John A. Tamplin Software Engineer (GWT), Google --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
