diff --git a/lib/componentFactory.js b/lib/componentFactory.js
index 8b90801..550a28b 100644
--- a/lib/componentFactory.js
+++ b/lib/componentFactory.js
@@ -80,9 +80,9 @@ module.exports = function(element) {
//
case this.components.center:
if (element.children().length > 0) {
- element.children().attr({
- align: 'center', class: 'center'
- });
+ element.children()
+ .attr('align', 'center')
+ .addClass('center');
}
element.attr('data-parsed', '');
diff --git a/test/components.js b/test/components.js
index 68de07b..fbe8523 100644
--- a/test/components.js
+++ b/test/components.js
@@ -159,7 +159,7 @@ describe('Callout', () => {
var expected = `
`;
@@ -172,7 +172,7 @@ describe('Callout', () => {
var expected = `
`;