Skip to content

Commit 7133583

Browse files
committed
👕 Fix linter issues
1 parent c6106d2 commit 7133583

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/utils.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class NumberedObject {
88
constructor(n, m=null) {
99
const a = [...Array(n).keys()];
1010
a.map(e => {
11-
this[e] = m === null ? 0 : new Array(m).fill(0);
11+
this[e] = m === null ? 0 : Array.from({ length: m }).fill(0);
1212
});
1313
}
1414
};
@@ -43,7 +43,7 @@ const sumObjectsArrays = (objs) => {
4343
for (let k in b) {
4444
if (b.hasOwnProperty(k)) {
4545
if (!a[k])
46-
a[k] = new Array(b[k].length).fill(0);
46+
a[k] = Array.from({ length: b[k].length }).fill(0);
4747
for(let i=0; i<b[k].length; ++i)
4848
a[k][i] = b[k][i] + a[k][i];
4949
}
@@ -77,13 +77,12 @@ const contactInvolved = (contact, message) => {
7777
const recipients = message.recipients.map(r => extractEmailAddress(r));
7878
const ccs = message.ccList.map(r => extractEmailAddress(r));
7979
const bccs = message.bccList.map(r => extractEmailAddress(r));
80-
if (
80+
return (
8181
contact == author
8282
|| recipients.includes(contact)
8383
|| ccs.includes(contact)
8484
|| bccs.includes(contact)
85-
) return true;
86-
else return false;
85+
);
8786
};
8887

8988
// check if a <message> is a self message

0 commit comments

Comments
 (0)