File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1369,17 +1369,17 @@ async function getUserByHandle (userHandle) {
1369
1369
}
1370
1370
1371
1371
/**
1372
- *
1373
- * @param {String } string that will be modifed
1372
+ *
1373
+ * @param {String } string that will be modifed
1374
1374
* @param {* } object of json that would be replaced in string
1375
- * @returns
1375
+ * @returns
1376
1376
*/
1377
1377
async function substituteStringByObject ( string , object ) {
1378
1378
for ( var key in object ) {
1379
- if ( ! object . hasOwnProperty ( key ) ) {
1380
- continue ;
1379
+ if ( ! Object . prototype . hasOwnProperty . call ( object , key ) ) {
1380
+ continue
1381
1381
}
1382
- string = string . replace ( new RegExp ( "{{" + key + "}}" , "g" ) , object [ key ] ) ;
1382
+ string = string . replace ( new RegExp ( '{{' + key + '}}' , 'g' ) , object [ key ] )
1383
1383
}
1384
1384
return string
1385
1385
}
Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ async function sendEmail (currentUser, data) {
325
325
subject : data . subject || template . subject ,
326
326
body : data . body || template . body
327
327
}
328
- for ( var key in subjectBody ) {
328
+ for ( var key in subjectBody ) {
329
329
subjectBody [ key ] = await helper . substituteStringByObject ( subjectBody [ key ] , data . data )
330
330
}
331
331
const emailData = {
You can’t perform that action at this time.
0 commit comments