mirror of
https://github.com/wekan/wekan.git
synced 2025-12-28 13:18:49 +01:00
fix wrong function / variable name (currentSetting -> currentAnnouncements)
This commit is contained in:
parent
b7dbeba7de
commit
cecf69af02
2 changed files with 7 additions and 6 deletions
|
|
@ -412,7 +412,7 @@ BlazeComponent.extendComponent({
|
|||
this.loading.set(w);
|
||||
},
|
||||
|
||||
currentSetting() {
|
||||
currentAnnouncements() {
|
||||
return Announcements.findOne();
|
||||
},
|
||||
|
||||
|
|
@ -427,8 +427,9 @@ BlazeComponent.extendComponent({
|
|||
|
||||
toggleActive() {
|
||||
this.setLoading(true);
|
||||
const isActive = this.currentSetting().enabled;
|
||||
Announcements.update(Announcements.findOne()._id, {
|
||||
const announcements = this.currentAnnouncements();
|
||||
const isActive = announcements.enabled;
|
||||
Announcements.update(announcements._id, {
|
||||
$set: { enabled: !isActive },
|
||||
});
|
||||
this.setLoading(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue