web: fix blank notes screen on screen resize

This commit is contained in:
Abdullah Atta
2022-10-18 13:52:17 +05:00
parent 918557dfcc
commit 2974d554ad
2 changed files with 3 additions and 2 deletions

View File

@@ -56,6 +56,8 @@ function CachedRouter() {
route.remove();
route = undefined;
}
} else {
cache[key] = false;
}
if (!cache[key]) {

View File

@@ -62,8 +62,7 @@ export default function useSlider(sliderId, { onSliding, onChange }) {
const slideToIndex = useCallback(
(index) => {
console.log(index, slides, ref.current, slides[index].node);
if (!ref.current || index >= slides.length) return;
if (!slides || !ref.current || index >= slides.length) return;
setTimeout(() => {
slides[index].node.scrollIntoView();
}, 100);