mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Backwards compatibility with deprecation for Discourse.PostMenuView
This commit is contained in:
parent
724781f426
commit
4706b77940
3 changed files with 13 additions and 5 deletions
|
@ -108,10 +108,13 @@ module Tilt
|
|||
result = "Controller" if result == "ControllerController"
|
||||
result = "Route" if result == "DiscourseRoute"
|
||||
result = "View" if result == "ViewView"
|
||||
|
||||
result.gsub!(/Mixin$/, '')
|
||||
result.gsub!(/Model$/, '')
|
||||
|
||||
@output << "\n\nDiscourse.#{result} = require('#{require_name}').default;\n"
|
||||
if result != "PostMenuView"
|
||||
@output << "\n\nDiscourse.#{result} = require('#{require_name}').default;\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue