We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbec318 commit cf2f605Copy full SHA for cf2f605
advanced/people.gs
@@ -111,7 +111,8 @@ function getContactByEmail(email) {
111
personFields: 'names,emailAddresses'
112
});
113
const contact = people['connections'].find((connection) => {
114
- return connection['emailAddresses'].some((emailAddress) => emailAddress['value'] === email);
+ if (connection['emailAddresses'] !== undefined)
115
+ return connection['emailAddresses'].some((emailAddress) => emailAddress['value'] === email);
116
117
// Prints the contact.
118
console.log('Contact: %s', JSON.stringify(contact, null, 2));
0 commit comments