microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect `shutdownStatsbeat` optional parameter handling (TypeError: _this._shutdownStatsbeat is not a function)

mkayander opened this issue · comments

I've bumped into this issue when using react-native-windows.
After a clean project install, I get this error from Sender.ts as I try to run it.

TypeError: _this._shutdownStatsbeat is not a function

After some digging, I found out that the shutdownStatsbeat parameter is optional, however, there is a case when this callback gets called without a check if it exists or not.

This issue needs to be fixed in this repo.

I've made a PR that would fix this issue. 🙂