FIX: Reorder categories not working

Ember was throwing this error preventing the reorder categories feature
from working:

```
access theidproperty (of <(unknown):ember1803>). ... the object in question
is a special kind of Ember object (a proxy). Therefore, it is still necessary
to use.get('id')in this case.
```

So I updated it to use the `get` method

https://api.emberjs.com/ember/3.14/functions/@ember%2Fobject/get

Follow up to: 6e5fedb312
This commit is contained in:
Blake Erickson 2019-12-10 12:32:18 -07:00
parent 3309a2b564
commit f921909595

View File

@ -79,7 +79,9 @@ function defaultCategoryLinkRenderer(category, opts) {
let restricted = get(category, "read_restricted"); let restricted = get(category, "read_restricted");
let url = opts.url let url = opts.url
? opts.url ? opts.url
: Discourse.getURL(`/c/${Category.slugFor(category)}/${category.id}`); : Discourse.getURL(
`/c/${Category.slugFor(category)}/${get(category, "id")}`
);
let href = opts.link === false ? "" : url; let href = opts.link === false ? "" : url;
let tagName = opts.link === false || opts.link === "false" ? "span" : "a"; let tagName = opts.link === false || opts.link === "false" ? "span" : "a";
let extraClasses = opts.extraClasses ? " " + opts.extraClasses : ""; let extraClasses = opts.extraClasses ? " " + opts.extraClasses : "";