FIX: Restore `propertyEqual` following native-class conversions (#28605)
I mistakenly replaced these with `@equal`, thinking the behavior was the same. It's not. `@propertyEqual` compares two properties, while `@equal` compares a single property with a constant.
This commit is contained in:
parent
54b281c4a2
commit
2e5502c417
|
@ -1,9 +1,10 @@
|
|||
import Component from "@ember/component";
|
||||
import { action } from "@ember/object";
|
||||
import { empty, equal } from "@ember/object/computed";
|
||||
import { empty } from "@ember/object/computed";
|
||||
import { scheduleOnce } from "@ember/runloop";
|
||||
import { underscore } from "@ember/string";
|
||||
import { classNameBindings, tagName } from "@ember-decorators/component";
|
||||
import { propertyEqual } from "discourse/lib/computed";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
@ -13,7 +14,7 @@ import I18n from "discourse-i18n";
|
|||
@classNameBindings("active", "tabClassName")
|
||||
export default class EditCategoryTab extends Component {
|
||||
@empty("params.slug") newCategory;
|
||||
@equal("selectedTab", "tab") active;
|
||||
@propertyEqual("selectedTab", "tab") active;
|
||||
|
||||
@discourseComputed("tab")
|
||||
tabClassName(tab) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Component from "@ember/component";
|
||||
import { equal } from "@ember/object/computed";
|
||||
import { classNameBindings } from "@ember-decorators/component";
|
||||
import { propertyEqual } from "discourse/lib/computed";
|
||||
import { prioritizeNameInUx } from "discourse/lib/settings";
|
||||
import { userPath } from "discourse/lib/url";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
|
@ -14,7 +14,7 @@ import I18n from "discourse-i18n";
|
|||
"primaryGroup"
|
||||
)
|
||||
export default class GroupPost extends Component {
|
||||
@equal("post.post_type", "site.post_types.moderator_action")
|
||||
@propertyEqual("post.post_type", "site.post_types.moderator_action")
|
||||
moderatorAction;
|
||||
|
||||
@discourseComputed("post.url")
|
||||
|
|
Loading…
Reference in New Issue