diff --git a/src/dom_components/model/ComponentTableFoot.js b/src/dom_components/model/ComponentTableFoot.js index e7ae0a9f1..861224a7b 100644 --- a/src/dom_components/model/ComponentTableFoot.js +++ b/src/dom_components/model/ComponentTableFoot.js @@ -1,22 +1,17 @@ import ComponentTableBody from './ComponentTableBody'; +import { toLowerCase } from 'utils/mixins'; + +const type = 'tfoot'; export default ComponentTableBody.extend( { defaults: { ...ComponentTableBody.prototype.defaults, - type: 'tfoot', - tagName: 'tfoot' + type, + tagName: type } }, { - isComponent(el) { - let result = ''; - - if (el.tagName == 'TFOOT') { - result = { type: 'tfoot' }; - } - - return result; - } + isComponent: el => toLowerCase(el.tagName) === type } ); diff --git a/test/specs/dom_components/model/ComponentTypes.js b/test/specs/dom_components/model/ComponentTypes.js index c985b8a83..98e522f91 100644 --- a/test/specs/dom_components/model/ComponentTypes.js +++ b/test/specs/dom_components/model/ComponentTypes.js @@ -53,6 +53,10 @@ describe('Component Types', () => { expectedType('', 'cell', { total: 2 }); }); + test(' is correctly recognized', () => { + expectedType('', 'tfoot', { skipHtml: 1 }); + }); + test('