From 569f3e6c228887a42dcaed6bc3f290e4a1f49cea Mon Sep 17 00:00:00 2001 From: Michael Rykov Date: Mon, 14 Feb 2022 12:21:23 +0800 Subject: [PATCH] Remove surrounding whitespace around icon --- addon/components/fa-icon.hbs | 4 ++-- tests/integration/components/fa-icon-test.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/addon/components/fa-icon.hbs b/addon/components/fa-icon.hbs index 6dae319..23b7fc2 100644 --- a/addon/components/fa-icon.hbs +++ b/addon/components/fa-icon.hbs @@ -1,4 +1,4 @@ -{{#if this.iconExists}} +{{~#if this.iconExists~}} {{this.content}} -{{/if}} +{{~/if~}} diff --git a/tests/integration/components/fa-icon-test.js b/tests/integration/components/fa-icon-test.js index fea8717..5e92c51 100644 --- a/tests/integration/components/fa-icon-test.js +++ b/tests/integration/components/fa-icon-test.js @@ -199,4 +199,11 @@ module('Integration | Component | fa icon', function (hooks) { assert.dom('svg').hasAttribute('x', '2'); assert.dom('svg').hasAttribute('y', '2'); }); + + test('it renders no surrounding whitespace', async function (assert) { + this.set('faCoffee', faCoffee); + await render(hbs``); + assert.ok(this.element.innerHTML.startsWith('')); + }); });