DEV: Fix a computed-property.override warning (#14922)

Regressed in #14307
This commit is contained in:
Jarek Radosz 2021-11-14 10:59:05 +01:00 committed by GitHub
parent 827b6c99ae
commit 4938381b78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,9 @@
/* global Pikaday:true */
import discourseComputed, { on } from "discourse-common/utils/decorators";
import Component from "@ember/component";
import I18n from "I18n";
import { Promise } from "rsvp";
import { action } from "@ember/object";
/* global Pikaday:true */
import loadScript from "discourse/lib/load-script";
import { schedule } from "@ember/runloop";
@ -144,9 +144,16 @@ export default Component.extend({
}
},
@discourseComputed()
placeholder() {
return I18n.t("dates.placeholder");
@discourseComputed("_placeholder")
placeholder: {
get(_placeholder) {
return _placeholder || I18n.t("dates.placeholder");
},
set(value) {
this.set("_placeholder", value);
return value;
},
},
_opts() {