Created
January 29, 2018 18:46
-
-
Save devtanc/0ba1ae421953c3050a1166acc1df3bf9 to your computer and use it in GitHub Desktop.
TypeError Symbol(Symbol.iterator) of undefined created by devtanc - https://repl.it/@devtanc/TypeError-SymbolSymboliterator-of-undefined
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taskData = {} | |
formatAppointment({ task: [], assignment: undefined }) | |
function formatAppointment({ task, assignment }) { | |
const [ taskData ] = task; | |
// Error shows here due to the assignment property being a non-iterable value | |
const [ assignmentData ] = assignment; | |
return { | |
schedule: { | |
end: assignmentData.finish[0], | |
start: assignmentData.start[0], | |
}, | |
address: { | |
zip: taskData.postcode[0], | |
city: taskData.city[0], | |
state: taskData.state[0], | |
street: taskData.street[0], | |
country: taskData.country[0], | |
}, | |
customer: { | |
name: taskData.name[0], | |
email: taskData.email[0], | |
phone: taskData.phone[0], | |
}, | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment