File tree 1 file changed +5
-3
lines changed
packages/mail/src/classes
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -180,18 +180,20 @@ class MailService {
180
180
//Send mail
181
181
try {
182
182
183
+ // copy object to avoid mutating original
184
+ const args = data ;
183
185
//Append multiple flag to data if not set
184
186
if ( typeof data . isMultiple === 'undefined' ) {
185
- data . isMultiple = isMultiple ;
187
+ args . isMultiple = isMultiple ;
186
188
}
187
189
188
190
//Append global substitution wrappers if not set in data
189
191
if ( typeof data . substitutionWrappers === 'undefined' ) {
190
- data . substitutionWrappers = this . substitutionWrappers ;
192
+ args . substitutionWrappers = this . substitutionWrappers ;
191
193
}
192
194
193
195
//Create Mail instance from data and get JSON body for request
194
- const mail = Mail . create ( data ) ;
196
+ const mail = Mail . create ( args ) ;
195
197
const body = mail . toJSON ( ) ;
196
198
197
199
//Filters the Mail body to avoid sensitive content leakage
You can’t perform that action at this time.
0 commit comments