diff --git a/app/helper.rb b/app/helper.rb index e295824d..cd7a3299 100644 --- a/app/helper.rb +++ b/app/helper.rb @@ -4,10 +4,10 @@ class Helper @@navigator = $window&.navigator def self.ios? - @@navigator.user_agent&.match?(/\b(iPad|iPhone|iPod)\b/) || false + @@navigator&.user_agent&.match?(/\b(iPad|iPhone|iPod)\b/) || false end def self.macos? - @@navigator.user_agent&.match?(/\bMac\b/) || false + @@navigator&.user_agent&.match?(/\bMac\b/) || false end end