Update src/libs/context.js
Co-authored-by: Justin Schroeder <justin@wearebraid.com>
This commit is contained in:
parent
1a334f9a9e
commit
bdbf2afc8f
@ -164,17 +164,7 @@ function nameOrFallback () {
|
||||
* determine if an input has a user-defined name
|
||||
*/
|
||||
function hasGivenName () {
|
||||
if (
|
||||
this.name &&
|
||||
typeof this.name === 'string' &&
|
||||
this.name !== `${this.type}_${this.id}` &&
|
||||
this.name !== `${this.type}_${this.defaultId}` &&
|
||||
// radio and checkbox options have their value as part of their ID so we need to filter those out too
|
||||
this.name !== `${this.type}_${(String(this.id).replace('_' + String(this.value), ''))}`
|
||||
) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return typeof this.name !== 'boolean'
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user