feat: Check for service worker updates on feed load
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -20,6 +20,14 @@ function Feed({ updateCache }) {
|
||||
useEffect(() => {
|
||||
const controller = new AbortController();
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.getRegistration().then(reg => {
|
||||
if (reg) {
|
||||
reg.update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fetch(filterSmallweb ? '/api?smallweb=true' : '/api', { signal: controller.signal })
|
||||
.then(res => {
|
||||
if (!res.ok) {
|
||||
|
||||
Reference in New Issue
Block a user