mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-04-27 12:33:43 +03:00
both statement have dupplicate bodies (#8633)
This commit is contained in:
parent
058424c16a
commit
11bfda92ba
|
@ -131,13 +131,7 @@ $(function () {
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
params[paramKey] = value
|
params[paramKey] = value
|
||||||
}
|
}
|
||||||
} else if (dataType === 'array' && paramValue) {
|
} else if ((dataType === 'array' && paramValue) || (dataType === 'object' && paramValue)) {
|
||||||
try {
|
|
||||||
params[paramKey] = JSON.parse(paramValue)
|
|
||||||
} catch (err) {
|
|
||||||
// Ignore malformed JSON
|
|
||||||
}
|
|
||||||
} else if (dataType === 'object' && paramValue) {
|
|
||||||
try {
|
try {
|
||||||
params[paramKey] = JSON.parse(paramValue)
|
params[paramKey] = JSON.parse(paramValue)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user