Skip to content

Commit

Permalink
both statement have dupplicate bodies (encode#8633)
Browse files Browse the repository at this point in the history
  • Loading branch information
gulshanAI authored and sigvef committed Dec 3, 2022
1 parent 521395a commit ac87536
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions rest_framework/static/rest_framework/docs/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,7 @@ $(function () {
if (value !== undefined) {
params[paramKey] = value
}
} else if (dataType === 'array' && paramValue) {
try {
params[paramKey] = JSON.parse(paramValue)
} catch (err) {
// Ignore malformed JSON
}
} else if (dataType === 'object' && paramValue) {
} else if ((dataType === 'array' && paramValue) || (dataType === 'object' && paramValue)) {
try {
params[paramKey] = JSON.parse(paramValue)
} catch (err) {
Expand Down

0 comments on commit ac87536

Please sign in to comment.