Skip to content

Commit

Permalink
both statement have dupplicate bodies (#8633)
Browse files Browse the repository at this point in the history
  • Loading branch information
gulshanAI authored Sep 22, 2022
1 parent 058424c commit 11bfda9
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 11bfda9

Please sign in to comment.