fixup 0e61de29: use break/continue instead of return

fixes #282
This commit is contained in:
tophf 2017-12-04 20:13:56 +03:00
parent dd05955a38
commit 3e9810678a

View File

@ -390,11 +390,11 @@ function getSections() {
function getSectionsHashes() {
const sections = [];
getSections().forEach(div => {
for (const div of getSections()) {
const meta = {urls: [], urlPrefixes: [], domains: [], regexps: []};
for (const li of $('.applies-to-list', div).childNodes) {
if (li.className === template.appliesToEverything.className) {
return;
break;
}
const type = $('[name=applies-type]', li).value;
const value = $('[name=applies-value]', li).value;
@ -404,11 +404,11 @@ function getSectionsHashes() {
}
const code = div.CodeMirror.getValue();
if (/^\s*$/.test(code) && Object.keys(meta).length === 0) {
return;
continue;
}
meta.code = code;
sections.push(meta);
});
}
return sections;
}