File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ class MessageHandler {
197197
198198 // get target mailbox data
199199 // get target user data
200+ // if throws will be handled by caller or wrapper
200201 let [ mailboxData , userData ] = await Promise . all ( [ this . getMailboxAsync ( options ) , this . users . collection ( 'users' ) . findOne ( { _id : options . user } ) ] ) ;
201202
202203 if ( ! userData ) {
@@ -2201,8 +2202,8 @@ class MessageHandler {
22012202 this . notifier . addEntries ( mailboxData , removeEntries , ( ) => {
22022203 // mark messages as added to new mailbox
22032204 this . notifier . addEntries ( targetData , existsEntries , ( ) => {
2204- removeEntries = [ ] ;
2205- existsEntries = [ ] ;
2205+ removeEntries . length = 0 ; // Clear top-level argument array, setting length to 0 clears array object
2206+ existsEntries . length = 0 ;
22062207 this . notifier . fire ( mailboxData . user ) ;
22072208 return resolve ( true ) ;
22082209 } ) ;
You can’t perform that action at this time.
0 commit comments