Empty arrays in JS are true, so I need to check for length. Sadface.

- tofumatt | http://tofumatt.com

On 2013-03-06, at 13:29, Fred Wenzel <notifications@github.com> wrote:

> In www/js/views/search.js:
> 
> > -            view.options.resultViews.push(resultView);
> > -        });
> > +                var extraViewOptions = view.childViewOptions || {};
> > +                var resultView = new SearchResultView(_.defaults({
> > +                    templateData: {
> > +                        imageURL: r.logo_url,
> > +                        name: r.title,
> > +                        rssURL: r.url
> > +                    }
> > +                }, extraViewOptions));
> > +
> > +                view.options.resultViews.push(resultView);
> > +            });
> > +        }
> > +
> > +        if (!view.options.resultViews.length) {
> same question here as above. Will !...resultViews suffice, or do you need to use .length?
> 
> —
> Reply to this email directly or view it on GitHub.