mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 21:16:48 +08:00
FIX: it should have been an array of arrays...:fired:
This commit is contained in:
parent
86f76e5b4d
commit
fc27b7442f
@ -277,14 +277,16 @@ class Plugin::Instance
|
|||||||
js << "});" << "\n"
|
js << "});" << "\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
result = []
|
||||||
|
|
||||||
if js.present?
|
if js.present?
|
||||||
# Generate an IIFE for the JS
|
# Generate an IIFE for the JS
|
||||||
asset = "(function(){#{js}})();"
|
asset = "(function(){#{js}})();"
|
||||||
hash = Digest::SHA1.hexdigest(asset)
|
hash = Digest::SHA1.hexdigest(asset)
|
||||||
["#{auto_generated_path}/plugin_#{hash}.js", asset]
|
result << ["#{auto_generated_path}/plugin_#{hash}.js", asset]
|
||||||
else
|
|
||||||
[]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
# note, we need to be able to parse seperately to activation.
|
# note, we need to be able to parse seperately to activation.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user