Skip to content

Commit 11bfda9

Browse files
authored
both statement have dupplicate bodies (encode#8633)
1 parent 058424c commit 11bfda9

File tree

1 file changed

+1
-7
lines changed
  • rest_framework/static/rest_framework/docs/js

1 file changed

+1
-7
lines changed

rest_framework/static/rest_framework/docs/js/api.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,7 @@ $(function () {
131131
if (value !== undefined) {
132132
params[paramKey] = value
133133
}
134-
} else if (dataType === 'array' && paramValue) {
135-
try {
136-
params[paramKey] = JSON.parse(paramValue)
137-
} catch (err) {
138-
// Ignore malformed JSON
139-
}
140-
} else if (dataType === 'object' && paramValue) {
134+
} else if ((dataType === 'array' && paramValue) || (dataType === 'object' && paramValue)) {
141135
try {
142136
params[paramKey] = JSON.parse(paramValue)
143137
} catch (err) {

0 commit comments

Comments
 (0)