forked from tanner/qotnews
Fix cache load race condition bug
This commit is contained in:
parent
72f1043952
commit
02b73a8b14
|
@ -24,8 +24,10 @@ class Article extends React.Component {
|
||||||
localForage.getItem(id)
|
localForage.getItem(id)
|
||||||
.then(
|
.then(
|
||||||
(value) => {
|
(value) => {
|
||||||
|
if (value) {
|
||||||
this.setState({ story: value });
|
this.setState({ story: value });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
fetch('/api/' + id)
|
fetch('/api/' + id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user