Skip to content

Commit

Permalink
Fix IE Edge Object doesn't support property or method 'removeAttribute'
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored and ardok committed Nov 8, 2018
1 parent 59a42ab commit 73e4519
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/_util/wave.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> {
}

onClick = (node: HTMLElement, waveColor: string) => {
if (node.className.indexOf('-leave') >= 0) {
if (!node || node.className.indexOf('-leave') >= 0) {
return;
}
const { insertExtraNode } = this.props;
Expand Down Expand Up @@ -113,7 +113,11 @@ export default class Wave extends React.Component<{insertExtraNode?: boolean}> {
}

componentDidMount() {
this.instance = this.bindAnimationEvent(findDOMNode(this) as HTMLElement);
const node = findDOMNode(this) as HTMLElement;
if (node.nodeType !== 1) {
return;
}
this.instance = this.bindAnimationEvent(node);
}

componentWillUnmount() {
Expand Down

0 comments on commit 73e4519

Please sign in to comment.