Skip to content

Commit cb326df

Browse files
dkadlecekalvaromb
authored andcommitted
Fix for Issue #320 (#324)
* fix enzyme test error * bump version number * Update package.json
1 parent a4318d7 commit cb326df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/KeyboardAwareHOC.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export type KeyboardAwareHOCOptions = ?{
104104
}
105105

106106
function getDisplayName(WrappedComponent: React$Component) {
107-
return WrappedComponent.displayName || WrappedComponent.name || 'Component'
107+
return WrappedComponent && (WrappedComponent.displayName || WrappedComponent.name) || 'Component'
108108
}
109109

110110
const ScrollIntoViewDefaultOptions: KeyboardAwareHOCOptions = {

0 commit comments

Comments
 (0)