FIX: it should have been an array of arrays...:fired:

This commit is contained in:
Régis Hanol 2015-11-06 15:42:16 +01:00
parent 86f76e5b4d
commit fc27b7442f
1 changed files with 5 additions and 3 deletions

View File

@ -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.