Skip to content

Commit b90b30f

Browse files
committed
bedrock: fix bedrock checks in plugin_available
1 parent c1a08c3 commit b90b30f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/helpers/application_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ def plugin_available?(name)
185185
# bedrock_config is referenced in the scope_controller and initialize on Rails startup
186186
# this mehtod is used to check if a plugin is available for the current domain when rendering the navigations
187187
# The server side part is done in the scope_controller
188-
return if @bedrock_config.plugin_hidden?(name.to_s)
188+
# do not check if @bedrock_config is nil, this is the case for controllers inheriting not from ScopeController
189+
unless @bedrock_config.nil?
190+
return if @bedrock_config.plugin_hidden?(name.to_s)
191+
end
189192
self.respond_to?("#{name}_plugin".to_sym)
190193
end
191194

0 commit comments

Comments
 (0)