Permalink
Browse files

resolve onUpdate on components that were unmounted

  • Loading branch information...
jamiebuilds committed May 24, 2018
1 parent 53c5284 commit 80368e19eb901b20dab18ca468897f8992f8cf25
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/unstated.js
View
@@ -91,6 +91,8 @@ export class Subscribe<Containers: ContainersType> extends React.Component<
return new Promise(resolve => {
if (!this.unmounted) {
this.setState(DUMMY_STATE, resolve);
} else {
resolve();
}
});
};

0 comments on commit 80368e1

Please sign in to comment.