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

Undefined from http request #44

Closed
BCusack opened this issue Apr 14, 2018 · 5 comments
Closed

Undefined from http request #44

BCusack opened this issue Apr 14, 2018 · 5 comments

Comments

@BCusack
Copy link

BCusack commented Apr 14, 2018

Bug

Angular Version = 5.2.1
Angular CLI Version = 1.7.4
Node & NPM Version = 5.8.0

When loading the app at localhost and booting intercom widget, http request returns undifind from the request to 'https://widget.intercom.io/widget/undifined'.
I've traced this back to ng-intercom.js at:

Intercom.prototype.l = function () { var d = document; var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = "https://widget.intercom.io/widget/" + this.id; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); };

as this.id is not a known variable of the function call this.l it returns undifined and should be:

Intercom.prototype.l = function (config) { var d = document; this.id = config.appId; var s = d.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = "https://widget.intercom.io/widget/" + this.id; var x = d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); };,

than used as 'this.l(config);'

@scott-wyatt
Copy link
Member

Can you show your CLI and tsconfig?

@BCusack
Copy link
Author

BCusack commented Apr 29, 2018

tsconfig
cli

@wbhob
Copy link
Contributor

wbhob commented Jun 8, 2018

Have you tested this with v6?

@wbhob
Copy link
Contributor

wbhob commented Jun 15, 2018

Closing due to no response. If this issue persists, please open a new issue.

@wbhob wbhob closed this as completed Jun 15, 2018
@BCusack
Copy link
Author

BCusack commented Jun 15, 2018

I’ll be spinning up a new project with v6, but intercom integration wants be until September. Let you know. Thanks

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

No branches or pull requests

3 participants