Merge pull request #513 from Microsoft/ajaxHotFix

Hotfix for ajax exception
This commit is contained in:
Kamil Szostak 2017-08-31 15:11:38 -07:00 коммит произвёл GitHub
Родитель 27e6cd2055 75f6b2cf8d
Коммит 0354aa7cc9
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -56,9 +56,13 @@ module Microsoft.ApplicationInsights {
///<summary>Determines whether ajax monitoring can be enabled on this document</summary>
///<returns>True if Ajax monitoring is supported on this page, otherwise false</returns>
private supportsMonitoring(): boolean {
var result = false;
if (!extensions.IsNullOrUndefined(XMLHttpRequest)) {
result = true;
var result = true;
if (extensions.IsNullOrUndefined(XMLHttpRequest) ||
extensions.IsNullOrUndefined(XMLHttpRequest.prototype) ||
extensions.IsNullOrUndefined(XMLHttpRequest.prototype.open) ||
extensions.IsNullOrUndefined(XMLHttpRequest.prototype.send) ||
extensions.IsNullOrUndefined(XMLHttpRequest.prototype.abort)) {
result = false;
}
return result;