We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20779ff commit 71b522aCopy full SHA for 71b522a
lib/rules/prop-types.js
@@ -360,7 +360,7 @@ module.exports = {
360
and property value. (key, value) => void
361
*/
362
function iterateProperties(properties, fn) {
363
- if (properties.length && typeof fn === 'function') {
+ if (properties && properties.length && typeof fn === 'function') {
364
for (let i = 0, j = properties.length; i < j; i++) {
365
const node = properties[i];
366
const key = getKeyValue(node);
0 commit comments