mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
FIX: Ensure nested ember components can be used with mustache syntax (#23912)
We run the ember-this-fallback transformation on plugin and theme code so that they can continue omitting `this.` in `.hbs` templates. A bug in the implementation meant that it was incorrectly transforming things like `{{dir/some-component}}` into `<DirSomeComponent />` (rather than `<Dir::SomeComponent />`). This commit uses patch-package to apply the fix from https://github.com/tildeio/ember-this-fallback/pull/56
This commit is contained in:
parent
7c6a8fa09a
commit
525cfcbe0e
|
@ -0,0 +1,14 @@
|
|||
diff --git a/node_modules/ember-this-fallback/lib/helpers/string.js b/node_modules/ember-this-fallback/lib/helpers/string.js
|
||||
index c6f4e65..91ed2af 100644
|
||||
--- a/node_modules/ember-this-fallback/lib/helpers/string.js
|
||||
+++ b/node_modules/ember-this-fallback/lib/helpers/string.js
|
||||
@@ -21,6 +21,8 @@ function squish(str) {
|
||||
}
|
||||
exports.squish = squish;
|
||||
function classify(str) {
|
||||
- return (0, lodash_1.upperFirst)((0, lodash_1.camelCase)(str));
|
||||
+ const parts = str.split('/');
|
||||
+ const classifiedParts = parts.map((p) => (0, lodash_1.upperFirst)((0, lodash_1.camelCase)(p)));
|
||||
+ return classifiedParts.join('::');
|
||||
}
|
||||
exports.classify = classify;
|
|
@ -6,7 +6,7 @@ require "json_schemer"
|
|||
class Theme < ActiveRecord::Base
|
||||
include GlobalPath
|
||||
|
||||
BASE_COMPILER_VERSION = 76
|
||||
BASE_COMPILER_VERSION = 77
|
||||
|
||||
attr_accessor :child_components
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user