From bdbf2afc8fdfcd369a1d3c62ed124687c253a611 Mon Sep 17 00:00:00 2001 From: Andrew Boyd Date: Sat, 2 May 2020 09:30:26 -0400 Subject: [PATCH] Update src/libs/context.js Co-authored-by: Justin Schroeder --- src/libs/context.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/libs/context.js b/src/libs/context.js index 53dc32d..5f5dc57 100644 --- a/src/libs/context.js +++ b/src/libs/context.js @@ -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' } /**