DEV: Extensively use includes() (#17541)

Also, the change in insert-hyperlink (from `this.linkUrl.indexOf("http") === -1` to `!this.linkUrl.startsWith("http")`) was intentional fix: we don't want to prevent users from looking up topics with http in their titles.
This commit is contained in:
Jarek Radosz
2022-07-17 20:48:36 +02:00
committed by GitHub
parent 5f7163b5bb
commit 057d6b406d
55 changed files with 95 additions and 108 deletions

View File

@ -69,7 +69,7 @@ export default Controller.extend({
if (available) {
const themes = !childThemes
? available
: available.filter((theme) => childThemes.indexOf(theme) === -1);
: available.filter((theme) => !childThemes.includes(theme));
return themes.length === 0 ? null : themes;
}
},