DEV: Prefers reads helper over alias (#15282)

This commit is contained in:
Penar Musaraj 2021-12-13 21:03:31 -05:00 committed by GitHub
parent b3e5421b25
commit 10caceec42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 Component from "@ember/component";
import { getOwner } from "discourse-common/lib/get-owner";
@ -9,7 +9,7 @@ export default Component.extend({
rerenderTriggers: ["validation.reason"],
tipReason: null,
lastShownAt: or("shownAt", "validation.lastShownAt"),
bad: alias("validation.failed"),
bad: reads("validation.failed"),
good: not("bad"),
@discourseComputed("bad")