From 83996be8f44606aeac974cb07e296144241524bc Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Mon, 10 Feb 2020 15:45:36 -0800 Subject: [PATCH] fix(icons): update helper files --- packages/icons/examples/preview/index.js | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/icons/examples/preview/index.js b/packages/icons/examples/preview/index.js index 6647aaf2065b..02b823a28cab 100644 --- a/packages/icons/examples/preview/index.js +++ b/packages/icons/examples/preview/index.js @@ -134,9 +134,7 @@ function App({ meta }) { {name} - {`${attrs.width}x${ - attrs.height - }`} + {`${attrs.width}x${attrs.height}`}
{svg}
@@ -201,22 +199,24 @@ function js2svg(descriptor) { attributes = { ...iconAttributes, style: style - .split(';') - .map(declaration => { - const [property, value] = declaration - .split(':') - .map(string => string.trim()); - return { - [property]: value, - }; - }) - .reduce( - (acc, declaration) => ({ - ...acc, - ...declaration, - }), - {} - ), + ? style + .split(';') + .map(declaration => { + const [property, value] = declaration + .split(':') + .map(string => string.trim()); + return { + [property]: value, + }; + }) + .reduce( + (acc, declaration) => ({ + ...acc, + ...declaration, + }), + {} + ) + : null, }; } @@ -232,16 +232,16 @@ function format(attrs) { } function getBugTemplate(info, source) { - const url = new URL('https://github.com/carbon-design-system/carbon/issues/new'); + const url = new URL( + 'https://github.com/carbon-design-system/carbon/issues/new' + ); const params = new URLSearchParams(); params.append('title', `🔍 Visual bug for the \`${info.filename}\` icon`); params.append( 'body', ` -There is an issue for the \`${ - info.basename - }\` icon when viewing [the elements demo](https://carbon-elements.netlify.com/icons/examples/preview/). +There is an issue for the \`${info.basename}\` icon when viewing [the elements demo](https://carbon-elements.netlify.com/icons/examples/preview/). The source for this icon is available [here](${source}).