Issue 7229 - Fixed: Whitelisted websites list not sorted alphabetically
This MR is for #240 (closed). When initializing custom filters, the acceptableAdsUrl
and acceptableAdsPrivacyUrl
variables haven't been set yet and are therefore null
. That means that calling isAcceptableAdsUrl(filter.url)
returns true
because filter.url
is undefined
and no sorting occurs.
Alternatively, I could've changed ==
to ===
but that would still not be sufficient as isAcceptableAdsUrl(null)
shouldn't return true
.
I understand that this fix doesn't resolve the underlying issue (i.e. ensure that variables have been set before using them) but changing isAcceptableAdsUrl()
to return a promise and other related changes would require quite a bit of rewriting.