Skip to content

Commit

Permalink
Removed prop duration to avoid invalid html attributes for Toast (gro…
Browse files Browse the repository at this point in the history
…mmet#1813)

* Removed prop duration from Toast component to avoid invalid html attributes on prop tranfer

* Increased test coverage
  • Loading branch information
Fauricio Rojas Hernández authored and ericsoderberghp committed Feb 5, 2018
1 parent 4d0139b commit dbdfd2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions __tests__/components/Toast-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jest.mock('react-dom');

describe('Toast', () => {
it('has correct default options', () => {
document.body.innerHTML = '<div></div>';
const component = renderer.create(
<Toast>
<span>
Expand Down
1 change: 1 addition & 0 deletions src/js/components/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class ToastContents extends Component {
const { closing } = this.state;

// removing context props to avoid invalid html attributes on prop transfer
delete rest.duration;
delete rest.history;
delete rest.intl;
delete rest.router;
Expand Down

0 comments on commit dbdfd2a

Please sign in to comment.