Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/helpers/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class Utilities {
* Utility to check if the code is running inside of an add-in.
*/
static get isAddin() {
return Utilities.host !== HostType.WEB;
return !!Utilities.host && Utilities.host !== HostType.WEB;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think the bigger issue is that Utilities.host returns undefined. This must be a regression (relative to the "@microsoft/office-js-helpers": "0.7.4" that Script Lab uses).

I remember running into something similar with Script Lab, hence we just stayed on 0.7.4. It would be good to diff it to see what the real culprit is.

Let me see if I can identify the issue later today.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I just submitted #135
I would recommend that as a fix

}

/**
Expand Down