PERF: Remove ember-link-component-extension to enable Glimmer LinkTo
Reopening Ember.LinkComponent causes `<LinkTo>` to enter 'legacy mode', and fall back to the Classic Component implementation. The extension added the ability to pass `@name` to the component. Setting a name (or any other attribute) on the new Glimmer implementation can be achieved by passing `name=` (no `@`). The original use case for this was refactored out during https://github.com/discourse/discourse/commit/d3649873a2. There are no other instances of `@name` being used in core or `all-the-*`. The update to section-link is required to avoid a warning when an `undefined` value is passed to the argument.
This commit is contained in:
parent
18e1f0e5b2
commit
e27966c944
|
@ -28,7 +28,7 @@
|
|||
<LinkTo
|
||||
class={{this.classNames}}
|
||||
@route={{@route}}
|
||||
@query={{@query}}
|
||||
@query={{or @query (hash)}}
|
||||
@models={{this.models}}
|
||||
@current-when={{@currentWhen}}
|
||||
title={{@title}}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
import Ember from "ember";
|
||||
let initializedOnce = false;
|
||||
|
||||
export default {
|
||||
name: "ember-link-component-extensions",
|
||||
|
||||
initialize() {
|
||||
if (initializedOnce) {
|
||||
return;
|
||||
}
|
||||
|
||||
Ember.LinkComponent.reopen({
|
||||
attributeBindings: ["name"],
|
||||
});
|
||||
|
||||
initializedOnce = true;
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue