Comparing version 2.1.0 to 2.1.1
@@ -43,4 +43,8 @@ function debounce(function_, wait = 100, options = {}) { | ||
const debounced = function (...arguments_) { | ||
if (storedContext && this !== storedContext) { | ||
throw new Error('Debounced method called with different contexts.'); | ||
if ( | ||
storedContext | ||
&& this !== storedContext | ||
&& Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext) | ||
) { | ||
throw new Error('Debounced method called with different contexts of the same prototype.'); | ||
} | ||
@@ -47,0 +51,0 @@ |
{ | ||
"name": "debounce", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Delay function calls until a set time elapses after the last invocation", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6775
98