Skip to content

Commit 431f1b9

Browse files
authored
Fixes for next.js
This throws an error in next.js because instanceOf(Element) will not work for SSR. The usage of dynamic import isn't exactly a solution but a workaround to a problem that only involves typechecking. Since this is for a react library, PropTypes.element should be good to check for the typing.
1 parent 61f19ea commit 431f1b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Steps/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class Steps extends Component {
1919
initialStep: PropTypes.number.isRequired,
2020
steps: PropTypes.arrayOf(
2121
PropTypes.shape({
22-
element: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Element)]),
22+
element: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
2323
intro: PropTypes.node.isRequired,
2424
position: introJsPropTypes.tooltipPosition,
2525
tooltipClass: PropTypes.string,

0 commit comments

Comments
 (0)