How is a string length ever negative?


On Mon, Jul 8, 2013 at 3:49 PM, Christopher Van <notifications@github.com>wrote:

> In hearth/media/js/views/comm.js:
>
> > +        var $this = $(this);
> > +        $(this).parent().siblings('.reply-box').removeClass('hidden');
> > +        $this.removeClass('open-reply')
> > +             .addClass('close-reply')
> > +             .html(gettext('Cancel reply'));
> > +
> > +    }).on('click', '.reply.button.close-reply', function(e) {
> > +        var $this = $(this);
> > +        $this.parent().siblings('.reply-box').addClass('hidden');
> > +        $this.removeClass('close-reply')
> > +             .addClass('open-reply')
> > +             .html(gettext('Respond'));
> > +
> > +    }).on('keyup', '.reply-text', function(e) {
> > +        var $this = $(this);
> > +        $this.siblings('button.post').toggleClass('disabled', $this.val().length < 0);
>
> shouldn't this be $this.val().length <= 0 or !!$this.val().length?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mozilla/commbadge/pull/1/files#r5078568>
> .
>