Skip to content

Commit

Permalink
Merge pull request #161 from rails/flavorjones-quash-uninit-ivar-warning
Browse files Browse the repository at this point in the history
fix: avoid uninitialized ivar warning
  • Loading branch information
flavorjones committed May 15, 2023
2 parents 35937ce + 1d0947d commit 50644ff
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/rails/html/sanitizer.rb
Expand Up @@ -21,11 +21,9 @@ def white_list_sanitizer # :nodoc:
end

def html5_support?
unless @html5_support_set
@html5_support = Loofah.respond_to?(:html5_support?) && Loofah.html5_support?
@html5_support_set = true
end
@html5_support
return @html5_support if defined?(@html5_support)

@html5_support = Loofah.respond_to?(:html5_support?) && Loofah.html5_support?
end
end

Expand Down

0 comments on commit 50644ff

Please sign in to comment.