Make this more readable

pull/228/head
Lim Chee Aun 2023-09-10 15:29:52 +08:00
rodzic 2d94f229c3
commit a0f16057a0
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -30,7 +30,8 @@ export default function useTitle(title, path) {
}
useLayoutEffect(() => {
const unsub = subscribeKey(states, 'currentLocation', setTitle);
setTitle();
return subscribeKey(states, 'currentLocation', setTitle);
return unsub;
}, [title, path]);
}