Add safe navigation for users without callout state
This commit is contained in:
parent
977996d2b3
commit
2cd71eb5f5
1 changed files with 1 additions and 1 deletions
|
@ -6,6 +6,6 @@ module CalloutsHelper
|
|||
private
|
||||
|
||||
def user_dismissed?(feature_name)
|
||||
Callout.find_by(user: current_user, feature_name: feature_name).dismissed_state?
|
||||
Callout.find_by(user: current_user, feature_name: feature_name)&.dismissed_state?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue