react-autobind
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -13,3 +13,3 @@ 'use strict'; | ||
if (context === undefined) { | ||
'console' in window && console.error('Autobind error: No context provided.'); | ||
console.error('Autobind error: No context provided.'); | ||
return; | ||
@@ -31,2 +31,7 @@ } | ||
if (descriptor === undefined) { | ||
console.warn('Autobind: "' + method + '" method not found in class.'); | ||
return; | ||
} | ||
// Return if it's special case function or if not a function at all | ||
@@ -33,0 +38,0 @@ if (wontBind.indexOf(method) !== -1 || typeof descriptor.value !== 'function') { |
{ | ||
"name": "react-autobind", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Automatically binds methods defined within a component's Class to the current object's lexical `this` instance (similarly to the default behavior of React.createClass).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -17,3 +17,3 @@ const wontBind = [ | ||
if(context === undefined) { | ||
'console' in window && console.error('Autobind error: No context provided.'); | ||
console.error('Autobind error: No context provided.'); | ||
return; | ||
@@ -35,2 +35,7 @@ } | ||
if(descriptor === undefined) { | ||
console.warn(`Autobind: "${method}" method not found in class.`); | ||
return; | ||
} | ||
// Return if it's special case function or if not a function at all | ||
@@ -37,0 +42,0 @@ if(wontBind.indexOf(method) !== -1 || typeof descriptor.value !== 'function') { |
Sorry, the diff of this file is not supported yet
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
20762
198