mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
FIX: it should have been an array of arrays...:fired:
This commit is contained in:
parent
86f76e5b4d
commit
fc27b7442f
1 changed files with 5 additions and 3 deletions
|
@ -277,14 +277,16 @@ class Plugin::Instance
|
|||
js << "});" << "\n"
|
||||
end
|
||||
|
||||
result = []
|
||||
|
||||
if js.present?
|
||||
# Generate an IIFE for the JS
|
||||
asset = "(function(){#{js}})();"
|
||||
hash = Digest::SHA1.hexdigest(asset)
|
||||
["#{auto_generated_path}/plugin_#{hash}.js", asset]
|
||||
else
|
||||
[]
|
||||
result << ["#{auto_generated_path}/plugin_#{hash}.js", asset]
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
# note, we need to be able to parse seperately to activation.
|
||||
|
|
Loading…
Reference in a new issue