Use the same options object in handle-response as in send-request #148
@@ -40,6 +40,7 @@ var formAction = function(el, event) {
|
||||
var tagName = element.tagName.toLowerCase()
|
||||
|
|
||||
// jscs:disable disallowImplicitTypeConversion
|
||||
if (!!element.name && element.attributes !== undefined && tagName !== "button") {
|
||||
// jscs:enable disallowImplicitTypeConversion
|
||||
var type = element.attributes.type
|
||||
|
||||
if ((!type || type.value !== "checkbox" && type.value !== "radio") || element.checked) {
|
||||
|
||||
Reference in New Issue
Block a user
Did you meant to remove this?
Yes. The tests run fine without it, so it's not necessary.
I should have added it to #147, but I forgot to do it before I merged it.
If you're explicitly disabling a test for a given code block with an inline comment, I think you should always re-enable it after to ensure that you don't accidentally lose coverage... or, alternatively, just disable the rule globally if you don't find it to be of any use.
In this case,
// jscs:disable disallowImplicitTypeConversionshould be paired with a// jscs:enable disallowImplicitTypeConversionsomewhere or we should disable the rule altogether, IMO. Personally, I'd be quite happy to disable it, as I find!!element.nameto be quite a convenient shorthand for casting to a Boolean.My bad. I just glanced quickly at it and I thought they were both
disablerules, applicable to only the next line.I'll revert that. Thanks for catching that.