Fix: remove unused if

This commit is contained in:
eight04 2021-12-10 20:10:42 +08:00
parent 6f5c051840
commit 2f79076faa
2 changed files with 2 additions and 6 deletions

View File

@ -56,9 +56,7 @@
return NOP;
}
return API.styles.getSectionsByUrl(url, id).then(sections => {
if (sections.cfg) {
delete sections.cfg;
}
delete sections.cfg;
const tasks = [];
for (const section of Object.values(sections)) {
const styleId = section.id;

View File

@ -187,9 +187,7 @@
if (!hasStyles && isDisabled || matchUrl === request.url) break;
matchUrl = request.url;
API.styles.getSectionsByUrl(matchUrl).then(sections => {
if (sections.cfg) {
delete sections.cfg;
}
delete sections.cfg;
hasStyles = true;
styleInjector.replace(sections);
});