File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/mail/src/classes Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -180,18 +180,20 @@ class MailService {
180180 //Send mail
181181 try {
182182
183+ // copy object to avoid mutating original
184+ const args = data ;
183185 //Append multiple flag to data if not set
184186 if ( typeof data . isMultiple === 'undefined' ) {
185- data . isMultiple = isMultiple ;
187+ args . isMultiple = isMultiple ;
186188 }
187189
188190 //Append global substitution wrappers if not set in data
189191 if ( typeof data . substitutionWrappers === 'undefined' ) {
190- data . substitutionWrappers = this . substitutionWrappers ;
192+ args . substitutionWrappers = this . substitutionWrappers ;
191193 }
192194
193195 //Create Mail instance from data and get JSON body for request
194- const mail = Mail . create ( data ) ;
196+ const mail = Mail . create ( args ) ;
195197 const body = mail . toJSON ( ) ;
196198
197199 //Filters the Mail body to avoid sensitive content leakage
You can’t perform that action at this time.
0 commit comments