restore if

This commit is contained in:
tophf 2021-04-08 05:48:29 +03:00 committed by GitHub
parent ad8b683c58
commit 5db1dc7bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,7 +186,7 @@
for (let retry = 0; !results.length && retry <= 2; retry++) {
results = await search({retry});
}
if (!results.length) {
if (results.length) {
const installedStyles = await API.styles.getAll();
const allSupportedIds = new Set(installedStyles.map(calcUsoId || calcUswId));
results = results.filter(r => !allSupportedIds.has(r.i));