Fix eslint issues
This commit is contained in:
parent
508f71f26b
commit
0037c699d9
993
edit/edit.js
993
edit/edit.js
File diff suppressed because it is too large
Load Diff
|
@ -12,6 +12,7 @@ for (const type of [NodeList, NamedNodeMap, HTMLCollection, HTMLAllCollection])
|
|||
}
|
||||
|
||||
// add favicon in Firefox
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
navigator.userAgent.includes('Firefox') && setTimeout(() => {
|
||||
const iconset = ['', 'light/'][prefs.get('iconset')] || '';
|
||||
for (const size of [38, 32, 19, 16]) {
|
||||
|
|
|
@ -128,8 +128,11 @@ function showStyles(styles = []) {
|
|||
function renderStyles() {
|
||||
const t0 = performance.now();
|
||||
let rendered = 0;
|
||||
while (index < sorted.length
|
||||
&& (shouldRenderAll || ++rendered < 10 || performance.now() - t0 < 10)) {
|
||||
while (
|
||||
index < sorted.length &&
|
||||
// eslint-disable-next-line no-unmodified-loop-condition
|
||||
(shouldRenderAll || ++rendered < 10 || performance.now() - t0 < 10)
|
||||
) {
|
||||
renderBin.appendChild(createStyleElement(sorted[index++]));
|
||||
}
|
||||
filterAndAppend({container: renderBin});
|
||||
|
@ -976,9 +979,14 @@ function objectDiff(first, second, path = '') {
|
|||
continue;
|
||||
}
|
||||
if (a && typeof a.filter == 'function' && b && typeof b.filter == 'function') {
|
||||
if (a.length != b.length
|
||||
|| a.some((el, i) => !el || typeof el != 'object' ? el != b[i]
|
||||
: objectDiff(el, b[i], path + key + '[' + i + '].').length)
|
||||
if (
|
||||
a.length != b.length ||
|
||||
a.some((el, i) => {
|
||||
const result = !el || typeof el != 'object'
|
||||
? el != b[i]
|
||||
: objectDiff(el, b[i], path + key + '[' + i + '].').length;
|
||||
return result;
|
||||
})
|
||||
) {
|
||||
diff.push({path, key, values: [a, b], type: 'changed'});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user