We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7c4bafc + ff06e42 commit b37f763Copy full SHA for b37f763
src/components/ChallengeEditor/ChallengePrizes-Field/index.js
@@ -48,8 +48,9 @@ class ChallengePrizesField extends Component {
48
onUpdateValue (challengePrize) {
49
const type = PRIZE_SETS_TYPE.CHALLENGE_PRIZES
50
const { onUpdateOthers, challenge } = this.props
51
+ const existingPrizes = challenge.prizeSets ? challenge.prizeSets.filter(p => p.type !== type) : []
52
- onUpdateOthers({ field: 'prizeSets', value: [...challenge.prizeSets.filter(p => p.type !== type), challengePrize] })
53
+ onUpdateOthers({ field: 'prizeSets', value: [...existingPrizes, challengePrize] })
54
}
55
56
getChallengePrize () {
0 commit comments