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
When trying to update a Vendor, I get the message:
Error: vendor must contain Id and SyncToken fields: { Id: 505, SyncToken: 1, sparse: true, TaxIdentifier: '123456789' }
I tracked this down to module.update() in the index.js file.
_.isEmpty(entity.SyncToken) returns true when you pass through a string or an integer of one digit.
According to the lodash docs: "Array-like values such as arguments objects, arrays, buffers, strings, or jQuery-like collections are considered empty if they have a length of 0. Similarly, maps and sets are considered empty if they have a size of 0." _.isEmpty(1); // → true
It works fine if I remove the two _.isEmpty tests, and I'd be happy to submit a pull request to remove them, but I'm sure that you have a reason for them, or an alternate way to submit the SyncToken that would work. Your example code uses SyncToken: 1
The text was updated successfully, but these errors were encountered:
When trying to update a Vendor, I get the message:
Error: vendor must contain Id and SyncToken fields: { Id: 505, SyncToken: 1, sparse: true, TaxIdentifier: '123456789' }
I tracked this down to module.update() in the index.js file.
_.isEmpty(entity.SyncToken)
returns true when you pass through a string or an integer of one digit.According to the lodash docs: "Array-like values such as arguments objects, arrays, buffers, strings, or jQuery-like collections are considered empty if they have a length of 0. Similarly, maps and sets are considered empty if they have a size of 0."
_.isEmpty(1); // → true
It works fine if I remove the two _.isEmpty tests, and I'd be happy to submit a pull request to remove them, but I'm sure that you have a reason for them, or an alternate way to submit the SyncToken that would work. Your example code uses
SyncToken: 1
The text was updated successfully, but these errors were encountered: