Skip to content

Commit 3b5f1ca

Browse files
authored
Fix EnhancedLocation sample typo (#2303)
1 parent f757bd2 commit 3b5f1ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-snippets/outlook-snippets.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ Office.EnhancedLocationsChangedEventArgs:interface:
362362
document.addEventListener('DOMContentLoaded', () => {
363363
// Get a reference to the mailbox and use it to add an event handler.
364364
const mailbox = Office.context.mailbox;
365-
mailbox.addHandlerAsync(Office.EventType.EnhancedLocationsChanged, enhancedLocationsChangedHandler, (result) => {
365+
mailbox.item.addHandlerAsync(Office.EventType.EnhancedLocationsChanged, enhancedLocationsChangedHandler, (result) => {
366366
if (result.status === Office.AsyncResultStatus.Failed) {
367-
console.error(`Failed to add event handler: ${asyncResult.error.message}`);
367+
console.error(`Failed to add event handler: ${result.error.message}`);
368368
return;
369369
}
370370

0 commit comments

Comments
 (0)