perf: service worker lifecycle method (#21532)
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
71a5d8b261
commit
e5868837d5
2 files changed
+17
-12
No files matched your search
@@ -91,6 +91,11 @@ export function NotificationSoundHandler() {
|
||||
// Don't automatically initialize - wait for user interaction
|
||||
return () => {
|
||||
stopSound();
|
||||
if (audioContextRef.current && audioContextRef.current.state !== "closed") {
|
||||
audioContextRef.current.close();
|
||||
}
|
||||
audioContextRef.current = null;
|
||||
audioBufferRef.current = null;
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in new issue
Block a user