Closed chasenlehara closed 5 years ago
Here’s where the exception is thrown: https://github.com/mjstahl/pto-tracker/blob/d2c733d31936ec2b1952e613348b41bc4fb34d57/models/time-entries.js#L31
Steps to reproduce (for me):
npm i && npm run develop
Here’s what r.response.time_entries.time_entry looks like when the exception is thrown:
r.response.time_entries.time_entry
{ "time_entry_id": { "_text":"1481692" }, "staff_id" :{ "_text":"35661" }, "project_id": { "_text":"9" }, "task_id": { "_text":"48" }, "hours": { "_text":"8" }, "date": { "_text":"2015-06-19" }, "notes": { }, "billed": { "_text":"0" } }
Let me know if there’s any other info I can provide. This project looks awesome!
I see what the problem could be here. xml-js doesn't know that the XML could have 1 or more time_entry. So when it sees one it's an object, when it sees more than 1 it's an array.
xml-js
time_entry
Thank you for this.
Here’s where the exception is thrown: https://github.com/mjstahl/pto-tracker/blob/d2c733d31936ec2b1952e613348b41bc4fb34d57/models/time-entries.js#L31
Steps to reproduce (for me):
npm i && npm run develop
Here’s what
r.response.time_entries.time_entry
looks like when the exception is thrown:Let me know if there’s any other info I can provide. This project looks awesome!