Skip to content

Commit

Permalink
fix(chips, text-field): add null check for foundation (#675) (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Schwer authored and Matt Goo committed May 30, 2019
1 parent 3ddf157 commit 40ca635
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/chips/ChipSet.tsx
Expand Up @@ -85,7 +85,7 @@ export default class ChipSet extends React.Component<
}

componentWillUnmount() {
this.state.foundation!.destroy();
this.state.foundation && this.state.foundation.destroy();
}

get classes() {
Expand Down
2 changes: 1 addition & 1 deletion packages/text-field/index.tsx
Expand Up @@ -134,7 +134,7 @@ class TextField<
}

componentWillUnmount() {
this.state.foundation!.destroy();
this.state.foundation && this.state.foundation.destroy();
}
/**
* getters
Expand Down

0 comments on commit 40ca635

Please sign in to comment.