mikeconley / myqonly

A tool for Mozillians who want to know how many reviews are in their queue in their browser.
Mozilla Public License 2.0
11 stars 12 forks source link

Fix regression breaking Github reviews #58

Closed ahal closed 2 years ago

ahal commented 2 years ago

This is a regression from PR #52

The expression:

(settings.ignoredRepos || "")
        .split(",")
        .map(s => s.trim())
        .filter(Boolean));

already returns an array, so wrapping it in new Array actually yields [ [] ]. This then causes ignoredRepos.length === 0 to always evaluate to false. So whenever this setting is empty, we'd actually hide all Github reviews.

ahal commented 2 years ago

I never noticed this since I had a repo applied (and it somehow works even with [ ["foo"] ].. I don't understand JS very well). I'm a bit surprised no on else has noticed up until now..

Sorry about this, you may want to do your own testing to make sure I'm not making any other silly mistakes.