Skip to content

Commit

Permalink
Fix linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Dec 22, 2017
1 parent 16439a7 commit 28a127c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ui/public/notify/toasts/global_toast_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { uiModules } from 'ui/modules';
import {
EuiGlobalToastList,
EuiGlobalToastListItem,
EuiLink,
EuiToast,
} from '@elastic/eui';

Expand Down Expand Up @@ -43,7 +42,7 @@ class GlobalToastList extends Component {
this.timeoutIds.push(setTimeout(() => {
this.props.dismissToast(toast);
this.setState(prevState => {
const toastIdToDismissedMap = { ...this.state.toastIdToDismissedMap };
const toastIdToDismissedMap = { ...prevState.toastIdToDismissedMap };
delete toastIdToDismissedMap[toast.id];

return {
Expand All @@ -59,7 +58,7 @@ class GlobalToastList extends Component {

startDismissingToast(toast) {
this.setState(prevState => {
const toastIdToDismissedMap = { ...this.state.toastIdToDismissedMap };
const toastIdToDismissedMap = { ...prevState.toastIdToDismissedMap };
toastIdToDismissedMap[toast.id] = true;

return {
Expand All @@ -83,7 +82,6 @@ class GlobalToastList extends Component {
render() {
const {
toasts,
dismissToast,
} = this.props;

const renderedToasts = toasts.map(toast => {
Expand Down

0 comments on commit 28a127c

Please sign in to comment.