Skip to content

Commit

Permalink
Update src/converters/helpers.js
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Claßen <philipp.classen@posteo.de>
  • Loading branch information
seia-soto and philipp-classen authored Aug 7, 2024
1 parent 1e7e9bd commit 453e9d8
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/converters/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,11 @@ export function generateResourcesMapping() {
];

function getPreferredResource(aliases) {
for (let i = 0; i < aliases.length; i++) {
if (!allowedResourceExtensions.includes(aliases[i].split('.').pop())) {
continue;
}

// Skip manually created uBO aliases by AdGuard
if (aliases[i].startsWith('ubo-')) {
continue;
}

return aliases[i];
}

return null;
}
// ignore non-supported files and manually created uBO aliases by AdGuard
return aliases.find(alias => {
const extension = alias.split('.').pop();
return allowedResourceExtensions.includes(extension) && !alias.startsWith('ubo-');
});

for (const redirect of redirects) {
// Skip, in case of AdGuard-only resource
Expand Down

0 comments on commit 453e9d8

Please sign in to comment.