DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)

This commit is contained in:
Joffrey JAFFEUX
2019-05-27 10:15:39 +02:00
committed by GitHub
parent 170c66c190
commit bfea922167
389 changed files with 2448 additions and 2460 deletions

View File

@ -21,16 +21,16 @@ export default Ember.Component.extend({
@observes("word")
removeMessage() {
if (this.get("showMessage") && !Ember.isEmpty(this.get("word"))) {
if (this.showMessage && !Ember.isEmpty(this.word)) {
this.set("showMessage", false);
}
},
@computed("word")
isUniqueWord(word) {
const words = this.get("filteredContent") || [];
const words = this.filteredContent || [];
const filtered = words.filter(
content => content.action === this.get("actionKey")
content => content.action === this.actionKey
);
return filtered.every(
content => content.word.toLowerCase() !== word.toLowerCase()
@ -39,7 +39,7 @@ export default Ember.Component.extend({
actions: {
submit() {
if (!this.get("isUniqueWord")) {
if (!this.isUniqueWord) {
this.setProperties({
showMessage: true,
message: I18n.t("admin.watched_words.form.exists")
@ -47,12 +47,12 @@ export default Ember.Component.extend({
return;
}
if (!this.get("formSubmitted")) {
if (!this.formSubmitted) {
this.set("formSubmitted", true);
const watchedWord = WatchedWord.create({
word: this.get("word"),
action: this.get("actionKey")
word: this.word,
action: this.actionKey
});
watchedWord