Skip to content

Commit

Permalink
#10 fix bugs and formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye Hohenberger committed Jun 22, 2017
1 parent 6b080dc commit 6b6181f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Expand Up @@ -16,7 +16,7 @@ let ignoreRegex;

export default ({ types: t }) => ({
visitor: {
ImportDeclaration (path, state) {
ImportDeclaration(path, state) {
const { ignorePattern } = state.opts;
if (ignorePattern) {
// Only set the ignoreRegex once:
Expand All @@ -33,9 +33,9 @@ export default ({ types: t }) => ({
const iconPath = state.file.opts.filename;
const svgPath = resolveFrom(dirname(iconPath), path.node.source.value);
const rawSource = readFileSync(svgPath, 'utf8');
let optimizedSource = state.opts.svgo === false
? optimize(rawSource, state.opts.svgo)
: rawSource
const optimizedSource = state.opts.svgo === false
? rawSource
: optimize(rawSource, state.opts.svgo);

const escapeSvgSource = escapeBraces(optimizedSource);

Expand Down

0 comments on commit 6b6181f

Please sign in to comment.