Skip to content

Commit dbc2323

Browse files
committed
Fix handling of missing enrichment_info
1 parent 567a9ed commit dbc2323

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

outlook/manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp">
33
<Id>c5549a21-aefb-4ba8-ae7c-b77bceab4023</Id>
4-
<Version>1.0.1</Version>
4+
<Version>1.0.2</Version>
55
<ProviderName>Odoo</ProviderName>
66
<DefaultLocale>en-US</DefaultLocale>
77
<DisplayName DefaultValue="Odoo for Outlook"/>

outlook/src/taskpane/components/Main/Main.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ class Main extends React.Component<MainProps, MainState> {
7070
cancellablePartnerRequest.promise.then(response => {
7171
const parsed = JSON.parse(response);
7272
var partner = PartnerData.fromJSON(parsed.result.partner);
73+
let enrichmentInfo = new EnrichmentInfo();
74+
if (parsed.result['enrichment_info']) {
75+
enrichmentInfo = new EnrichmentInfo(parsed.result['enrichment_info'].type, parsed.result['enrichment_info'].info)
76+
}
7377
this.setState({
74-
EnrichmentInfo: new EnrichmentInfo(parsed.result['enrichment_info'].type, parsed.result['enrichment_info'].info),
78+
EnrichmentInfo: enrichmentInfo,
7579
partnerCreated: parsed.result['created'],
7680
showEnrichmentInfoMessage: true,
7781
showPartnerCreatedMessage: true

0 commit comments

Comments
 (0)