This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -174,9 +174,9 @@ async function updateChallenge (challenge, previousState) {
174
174
updateDetails [ op ] = { }
175
175
}
176
176
if ( key === 'attachments' ) {
177
- updateDetails [ op ] . attachments = newAttachments
177
+ updateDetails [ op ] . attachments = updateChallenge . attachments
178
178
} else if ( key === 'terms' ) {
179
- updateDetails [ op ] . terms = newTermsOfUse
179
+ updateDetails [ op ] . terms = updateChallenge . terms
180
180
} else {
181
181
updateDetails [ op ] [ key ] = value
182
182
}
@@ -185,10 +185,10 @@ async function updateChallenge (challenge, previousState) {
185
185
let newValue
186
186
if ( key === 'attachments' ) {
187
187
oldValue = previousState . attachments ? JSON . stringify ( previousState . attachments ) : 'NULL'
188
- newValue = JSON . stringify ( newAttachments )
188
+ newValue = JSON . stringify ( updateChallenge . attachments )
189
189
} else if ( key === 'terms' ) {
190
190
oldValue = previousState . terms ? JSON . stringify ( previousState . terms ) : 'NULL'
191
- newValue = JSON . stringify ( newTermsOfUse )
191
+ newValue = JSON . stringify ( updateChallenge . terms )
192
192
} else {
193
193
oldValue = previousState [ key ] ? JSON . stringify ( previousState [ key ] ) : 'NULL'
194
194
newValue = JSON . stringify ( value )
You can’t perform that action at this time.
0 commit comments