FIX: Ensure `<script>` handlebars templates are namespaced correctly (#18178)
This regressed in 7e74dd0afe
This commit is contained in:
parent
d262775c3e
commit
f4e1d0c546
|
@ -6,7 +6,7 @@ require 'json_schemer'
|
|||
class Theme < ActiveRecord::Base
|
||||
include GlobalPath
|
||||
|
||||
BASE_COMPILER_VERSION = 62
|
||||
BASE_COMPILER_VERSION = 63
|
||||
|
||||
attr_accessor :child_components
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class ThemeField < ActiveRecord::Base
|
|||
if is_raw
|
||||
js_compiler.append_raw_template(name, hbs_template)
|
||||
else
|
||||
js_compiler.append_ember_template(name, hbs_template)
|
||||
js_compiler.append_ember_template("discourse/templates/#{name}", hbs_template)
|
||||
end
|
||||
rescue ThemeJavascriptCompiler::CompileError => ex
|
||||
errors << ex.message
|
||||
|
|
|
@ -134,6 +134,7 @@ HTML
|
|||
expect(javascript_cache.content).to include("testing-div")
|
||||
expect(javascript_cache.content).to include("string_setting")
|
||||
expect(javascript_cache.content).to include("test text \\\" 123!")
|
||||
expect(javascript_cache.content).to include("define(\"discourse/theme-#{theme_field.theme_id}/discourse/templates/my-template\"")
|
||||
end
|
||||
|
||||
it "correctly generates errors for transpiled css" do
|
||||
|
|
Loading…
Reference in New Issue