You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.
In processAddress.js, there is a conditional to handle data.name being an object, and convert something like { first: 'My', last: 'Name' } into simply "My Name".
I've tested this with node 8.0.0 and 6.11.1 and neither behave as expected, still giving the stringified object in the "to" field of emails.
I added a few log statements to see what's going on, and it seems there is a failed attempt to modify the passed object (I've included line numbers in the snippet)
15> data.name = [data.name.first, data.name.last].filter(truthy).join(' '); // Should be assigning data.name to a string?
16> console.log(data.name); // output: { first: 'Admin', last: 'User' }
17> console.log([data.name.first, data.name.last].filter(truthy).join(' ')); // output: Admin User
data is not successfully being modified here for some reason (anyone more familiar with JS object references care to explain?) (data is the sole argument of processAddress()).
I propose that instead of modifying the passed object reference, rtn.name is assigned directly. There are no other points where the data argument is (needlessly) modified in this function.
The text was updated successfully, but these errors were encountered:
@kaaljabr No specific update aside from the bug apparently still existing. It looks like @ivangreene's PR #31 will address this, but didn't get any feedback to progress. The code change should be accompanied by an updated test case, and the baseline for Node support is now LTS (currently Node 6 & 8) so failures in Node 0.12 are no longer relevant.
In
processAddress.js
, there is a conditional to handledata.name
being an object, and convert something like{ first: 'My', last: 'Name' }
into simply"My Name"
.I've tested this with
node 8.0.0
and6.11.1
and neither behave as expected, still giving the stringified object in the "to" field of emails.I added a few log statements to see what's going on, and it seems there is a failed attempt to modify the passed object (I've included line numbers in the snippet)
data
is not successfully being modified here for some reason (anyone more familiar with JS object references care to explain?) (data
is the sole argument ofprocessAddress()
).I propose that instead of modifying the passed object reference,
rtn.name
is assigned directly. There are no other points where thedata
argument is (needlessly) modified in this function.The text was updated successfully, but these errors were encountered: