Skip to content

Commit 461121e

Browse files
committed
Reassign data object in create
voucher to avoid modify the original object
1 parent f75ee91 commit 461121e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Class/ElectronicBilling.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ module.exports = class ElectronicBilling extends AfipWebService {
5959
* AFIP {@see WS Specification item 4.1.3}
6060
**/
6161
async createVoucher(data, returnResponse = false) {
62+
// Reassign data to avoid modify te original object
63+
data = Object.assign({}, data);
64+
6265
const req = {
6366
'FeCAEReq' : {
6467
'FeCabReq' : {

0 commit comments

Comments
 (0)