about summary refs log tree commit diff
path: root/app/models/web
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/web')
-rw-r--r--app/models/web/push_subscription.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb
index da67e7665..a41906227 100644
--- a/app/models/web/push_subscription.rb
+++ b/app/models/web/push_subscription.rb
@@ -24,12 +24,12 @@ class Web::PushSubscription < ApplicationRecord
   end
 
   def pushable?(notification)
-    data && data.key?('alerts') && data['alerts'][notification.type.to_s]
+    data&.key?('alerts') && data['alerts'][notification.type.to_s]
   end
 
   def as_payload
     payload = { id: id, endpoint: endpoint }
-    payload[:alerts] = data['alerts'] if data && data.key?('alerts')
+    payload[:alerts] = data['alerts'] if data&.key?('alerts')
     payload
   end