@segment/analytics.js-core
Advanced tools
Comparing version 3.4.0 to 3.4.1
3.4.1 / 2018-04-23 | ||
================== | ||
* Catch and guard against Integration errors | ||
3.4.0 / 2018-03-05 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -618,3 +618,7 @@ 'use strict'; | ||
} else { | ||
integration.invoke.call(integration, method, facade); | ||
try { | ||
integration.invoke.call(integration, method, facade); | ||
} catch (e) { | ||
self.log('Error invoking .%s method of %s integration: %o', method, name, e); | ||
} | ||
} | ||
@@ -621,0 +625,0 @@ }, this._integrations); |
{ | ||
"name": "@segment/analytics.js-core", | ||
"author": "Segment <friends@segment.com>", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "The hassle-free way to integrate analytics into any web application.", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -325,2 +325,7 @@ 'use strict'; | ||
it('should not crash when invoking integration fails', function() { | ||
Test.prototype.invoke = function() { throw new Error('Uh oh!'); }; | ||
analytics.track('Test Event'); | ||
}); | ||
it('should support .integrations to disable / select integrations', function() { | ||
@@ -327,0 +332,0 @@ var opts = { integrations: { Test: false } }; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
176049
3967
31
1