Quote nested API parameters in api.js

I sometimes have parameter names with a period (.) in them, to represent nested objects, e.g. containerobj.inner_param. The Javascript was throwing an error in the browsable API when interacting with those parameters.
This commit is contained in:
Dan Koch 2017-06-13 16:01:02 -04:00 committed by GitHub
parent b96a22011b
commit 4701f12c3e

View File

@ -102,7 +102,7 @@ $(function () {
var entry = entries[i]
var paramKey = entry[0]
var paramValue = entry[1]
var $elem = $form.find('[name=' + paramKey + ']')
var $elem = $form.find('[name="' + paramKey + '"]')
var dataType = $elem.data('type') || 'string'
if (dataType === 'integer' && paramValue) {