`ember-cached-decorator-polyfill` uses a Babel transformation to apply this polyfill in core. Adding that Babel transformation to themes and plugins will be complex, so we use this to patch it at runtime. This can be removed once `@glimmer/tracking` is updated to a version with native `@cached` support.
16 lines
366 B
JavaScript
16 lines
366 B
JavaScript
import Component from "@glimmer/component";
|
|
import { inject as service } from "@ember/service";
|
|
import { cached } from "@glimmer/tracking";
|
|
|
|
export default class ReviewableChatMessage extends Component {
|
|
@service store;
|
|
|
|
@cached
|
|
get chatChannel() {
|
|
return this.store.createRecord(
|
|
"chat-channel",
|
|
this.args.reviewable.chat_channel
|
|
);
|
|
}
|
|
}
|