Skip to content

Commit bb0a457

Browse files
committed
Add explicit > check for params length
1 parent 18ad186 commit bb0a457

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rules/prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ module.exports = {
174174
*/
175175
function isSuperTypeParameterPropsDeclaration(node) {
176176
if (node && node.type === 'ClassDeclaration') {
177-
if (node.superTypeParameters && node.superTypeParameters.params.length) {
177+
if (node.superTypeParameters && node.superTypeParameters.params.length > 0) {
178178
return true;
179179
}
180180
}

tests/lib/rules/prop-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const settings = {
2929
require('babel-eslint');
3030

3131
function withAndWithoutFlowVersion(flowVersion, test) {
32-
return [test, Object.assign({}, test, {settings: {react: {flowVersion}}})];
32+
return [test, Object.assign({}, test, {settings: {react: {flowVersion: flowVersion}}})];
3333
}
3434

3535
// ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)