File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments