mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fix for announcement duplicates.
This commit is contained in:
parent
b8d65bab44
commit
316b382d81
2 changed files with 3 additions and 2 deletions
|
@ -40,7 +40,7 @@ block content
|
|||
li Artisans - Sootn, Aftermath, mcdavid1991
|
||||
li Scribes - Ryan Faidley
|
||||
li Adventurers - Kieizroe, (...)
|
||||
li Archmages - David Golds, Zach Martin, Tom Steinbrecher, Mischa Lewis-Norelle, Sébastien Moratinos
|
||||
li Archmages - David Golds, Zach Martin, Tom Steinbrecher, Mischa Lewis-Norelle, Sébastien Moratinos, Chloe Fan
|
||||
|
||||
div#contribute-main
|
||||
div#intro
|
||||
|
|
|
@ -47,8 +47,9 @@ module.exports = class SignupModalView extends View
|
|||
for key, val of me.attributes when key in ["preferredLanguage", "testGroupNumber", "dateCreated", "wizardColor1", "name", "music", "volume", "emailSubscriptions"]
|
||||
userObject[key] ?= val
|
||||
subscribe = @$el.find('#signup-subscribe').prop('checked')
|
||||
userObject.emailSubscriptions ?= []
|
||||
if subscribe
|
||||
(userObject.emailSubscriptions ?= []).push 'announcement'
|
||||
userObject.emailSubscriptions.push 'announcement' unless 'announcement' in userObject.emailSubscriptions
|
||||
else
|
||||
userObject.emailSubscriptions = _.without (userObject.emailSubscriptions ? []), 'announcement'
|
||||
res = tv4.validateMultiple userObject, User.schema.attributes
|
||||
|
|
Loading…
Reference in a new issue