FIX: @ember/object is not yet available in stable
This commit is contained in:
parent
6db4586ca1
commit
7933a29fa0
|
@ -5,7 +5,6 @@ import { h } from "virtual-dom";
|
||||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||||
import { queryRegistry } from "discourse/widgets/widget";
|
import { queryRegistry } from "discourse/widgets/widget";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
import { get } from "@ember/object";
|
|
||||||
|
|
||||||
function registerTopicFooterButtons(api) {
|
function registerTopicFooterButtons(api) {
|
||||||
api.registerTopicFooterButton({
|
api.registerTopicFooterButton({
|
||||||
|
@ -234,11 +233,11 @@ function initialize(api) {
|
||||||
if (dec.attrs.post_number === 1) {
|
if (dec.attrs.post_number === 1) {
|
||||||
const postModel = dec.getModel();
|
const postModel = dec.getModel();
|
||||||
if (postModel) {
|
if (postModel) {
|
||||||
const assignedToUser = get(postModel, "topic.assigned_to_user");
|
const assignedToUser = Ember.get(postModel, "topic.assigned_to_user");
|
||||||
if (assignedToUser) {
|
if (assignedToUser) {
|
||||||
return dec.widget.attach("assigned-to", {
|
return dec.widget.attach("assigned-to", {
|
||||||
assignedToUser,
|
assignedToUser,
|
||||||
href: get(postModel, "topic.assignedToUserPath")
|
href: Ember.get(postModel, "topic.assignedToUserPath")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue