From b919a7cf11d56ff2f59c5e23c87f177721260a4f Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Thu, 25 Mar 2021 14:04:59 -0700 Subject: [PATCH] Fixing icons not obeying the size attribute --- build/engines.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/engines.js b/build/engines.js index 9f9d9f4..2b81c77 100644 --- a/build/engines.js +++ b/build/engines.js @@ -251,11 +251,13 @@ class Injectables { const { hash, env, resolve: rval } = args.pop(); const local = rval('@root.this.local'); const tpath = path.join(local.root, 'svg', name + '.svg'); + if (hash.size && String(hash.size).match(/^\d+$/)) { + hash.size = hash.size + 'px'; + } const frame = handybars.makeContext(hash, env); - try { const contents = self._template(tpath, (s) => - handybars(`${s}`), + handybars(`${s}`), )(frame); return handybars.safe(contents);