Skip to content

Commit

Permalink
fix(ToastContainer): replace _.omit with object rest
Browse files Browse the repository at this point in the history
* Original commit: ca0765f
* Original author: @jean343
* Closes #105
* Closes #104
  • Loading branch information
jean343 authored and tomchentw committed Aug 21, 2017
1 parent fb6ecd5 commit bc1a397
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/ToastContainer.js
Expand Up @@ -139,11 +139,10 @@ export default class ToastContainer extends Component {
}

render() {
const divProps = _.omit(this.props, [`toastType`, `toastMessageFactory`, `preventDuplicates`,
`newestOnTop`]);
const {toastType, toastMessageFactory, preventDuplicates, newestOnTop, ...restProps} = this.props;

return (
<div {...divProps} aria-live="polite" role="alert">
<div {...restProps} aria-live="polite" role="alert">
{this.state.toasts.map(toast => this.props.toastMessageFactory(toast))}
</div>
);
Expand Down

0 comments on commit bc1a397

Please sign in to comment.