DEV: Ensure the correct plugin stylesheets are reloaded in development

If a plugin name contained the name of another plugin, the wrong stylesheets would be reloaded. For example, working on discourse-prometheus-alert-receiver would cause discourse-prometheus stylesheets to be reloaded.
This commit is contained in:
David Taylor 2020-08-06 16:10:57 +01:00
parent 87e2c9de24
commit 76c02cac65
No known key found for this signature in database
GPG Key ID: 46904C18B1D3F434

@ -61,7 +61,7 @@ module Stylesheet
paths.map! do |long|
plugin_name = nil
plugins_paths.each do |plugin_path|
if long.include?(plugin_path)
if long.include?("#{plugin_path}/")
plugin_name = File.basename(plugin_path)
break
end