Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(intercom): safely check for app_id in optional param #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yharaskrik
Copy link

Summary of changes:
Because intercomData is optional in the boot method then we need to use optional chaining to check for app_id otherwise it will error if that parameter is not passed on

Intended/example use case:
app_id is configured in the forRoot method so when calling .boot() without a paramter the line const app_id = intercomData.app_id ? intercomData.app_id : this.config.appId will error since intercomData is optional.

Checklist:

  • npm run build runs without error
  • ng serve spawns app, Intercom messenger is visible and interactive, and there are no errors in the console

Closes issue: #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant