Use the same options object in handle-response as in send-request (#148)

Instead of cloning this.options again in handle-response.js, pass the options object from send-request.js. This way, pjax.state.options will also have the request options.
This commit was merged in pull request #148.
This commit is contained in:
BehindTheMath
2018-04-26 09:27:50 -04:00
committed by GitHub
parent 358b6f6836
commit 7d26a75fdf
5 changed files with 20 additions and 14 deletions

View File

@@ -40,8 +40,9 @@ var formAction = function(el, event) {
var tagName = element.tagName.toLowerCase()
// jscs:disable disallowImplicitTypeConversion
if (!!element.name && element.attributes !== undefined && tagName !== "button") {
var type = element.attributes.type
// jscs:enable disallowImplicitTypeConversion
var type = element.attributes.type
if ((!type || type.value !== "checkbox" && type.value !== "radio") || element.checked) {
// Build array of values to submit
var values = []