Skip to content

Commit 78e2951

Browse files
committed
Fixed bug
1 parent dda03e9 commit 78e2951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/no-unused-prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ module.exports = {
266266
* @return {Boolean} True if the node is inside a lifecycle method
267267
*/
268268
function isInLifeCycleMethod(node) {
269-
if (node.type === 'MethodDefinition' && isNodeALifeCycleMethod(node)) {
269+
if ((node.type === 'MethodDefinition' || node.type === 'Property') && isNodeALifeCycleMethod(node)) {
270270
return true;
271271
}
272272

0 commit comments

Comments
 (0)