OfficeDev / office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs
MIT License
126 stars 56 forks source link

convertHostValue returns undefined if host is undefined in utilities.ts #69

Open ayushsood opened 6 years ago

ayushsood commented 6 years ago

In the case that host is undefined it would be helpful if there was a default value here: https://github.com/lemniscate-labs/office-js-helpers/blob/master/src/helpers/utilities.ts#L102

Can it fallback to the following:

return officeJsToHelperEnumMapping[host] || host || HostType.WEB;
WrathOfZombies commented 6 years ago

Good catch. Can you send a PR?