mirror of
https://github.com/discourse/discourse.git
synced 2025-04-09 01:00:52 +08:00
DEV: Prefers reads helper over alias (#15282)
This commit is contained in:
parent
b3e5421b25
commit
10caceec42
@ -1,4 +1,4 @@
|
|||||||
import { alias, not, or } from "@ember/object/computed";
|
import { not, or, reads } from "@ember/object/computed";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { getOwner } from "discourse-common/lib/get-owner";
|
import { getOwner } from "discourse-common/lib/get-owner";
|
||||||
@ -9,7 +9,7 @@ export default Component.extend({
|
|||||||
rerenderTriggers: ["validation.reason"],
|
rerenderTriggers: ["validation.reason"],
|
||||||
tipReason: null,
|
tipReason: null,
|
||||||
lastShownAt: or("shownAt", "validation.lastShownAt"),
|
lastShownAt: or("shownAt", "validation.lastShownAt"),
|
||||||
bad: alias("validation.failed"),
|
bad: reads("validation.failed"),
|
||||||
good: not("bad"),
|
good: not("bad"),
|
||||||
|
|
||||||
@discourseComputed("bad")
|
@discourseComputed("bad")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user