Check for window.isSecureContext when determining Notification support
This commit is contained in:
committed by
Deluan Quintão
parent
7c23bd0890
commit
0d35148152
@@ -131,7 +131,7 @@ const NotificationsToggle = () => {
|
||||
const dispatch = useDispatch()
|
||||
const notify = useNotify()
|
||||
const currentSetting = useSelector((state) => state.settings.notifications)
|
||||
const notAvailable = !('Notification' in window)
|
||||
const notAvailable = !('Notification' in window) || !window.isSecureContext
|
||||
|
||||
if (
|
||||
(currentSetting && Notification.permission !== 'granted') ||
|
||||
|
||||
Reference in New Issue
Block a user