https://bugzilla.wikimedia.org/show_bug.cgi?id=52198

--- Comment #3 from Roan Kattouw <[email protected]> ---
(In reply to comment #2)
> > > >      if (content.params) {
> 
> If we had used coffescript instead of plain JS, it would be so simple to
> write
> that as:
>  if content?.params
>    ...
> 
> Now I assume we'll need to do it manually as
>   if (typeof content !== "undefined" && content !== null && content.params) {
>     ...
>   }
It's much easier than that, you can just do if ( content && content.params ) .
No need to use typeof and string comparisons and all that :)

Really, though, content shouldn't be undefined in the first place.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to