This commit is contained in:
Gregorio
2019-03-03 17:58:09 +01:00
parent 8af517b965
commit bb67bb1697
2 changed files with 11 additions and 9 deletions
+1 -6
View File
@@ -34,19 +34,14 @@ class App extends React.Component {
exact: true,
strict: false
});
if (prevState.videoId !== null) {
if (idMatch && idMatch.params.id !== prevState.videoId) {
localStorage.setItem('prevId', prevState.videoId)
localStorage.setItem('lastId', idMatch.params.id)
return { videoId: idMatch.params.id };
}
else {
if (idMatch && idMatch.params.id !== prevState.videoId) {
localStorage.setItem('lastId', idMatch.params.id)
return { videoId: idMatch.params.id };
}
return null;
}
}
}