8000
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.
1 parent 058424c commit 11bfda9Copy full SHA for 11bfda9
rest_framework/static/rest_framework/docs/js/api.js
@@ -131,13 +131,7 @@ $(function () {
131
if (value !== undefined) {
132
params[paramKey] = value
133
}
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) {
+ } else if ((dataType === 'array' && paramValue) || (dataType === 'object' && paramValue)) {
141
try {
142
params[paramKey] = JSON.parse(paramValue)
143
} catch (err) {
0 commit comments