Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
strarsis committed Oct 30, 2019
1 parent 001a87a commit b5357d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/svgo.js
Expand Up @@ -38,7 +38,7 @@ SVGO.prototype.optimize = function(svgstr, info) {
return;
}

if (info.multipassCount = ++counter < maxPassCount && svgjs.data.length < prevResultSize) {
if ((info.multipassCount = ++counter) < maxPassCount && svgjs.data.length < prevResultSize) {
prevResultSize = svgjs.data.length;
this._optimizeOnce(svgjs.data, info, optimizeOnceCallback);
} else {
Expand Down
8 changes: 4 additions & 4 deletions test/coa/_index.js
Expand Up @@ -179,7 +179,7 @@ describe('coa', function() {
}).then(function() {
const svgOut = fs.readFileSync('temp.svg', 'utf8');

done(/in_svg__/.test(svgOut) ? null : "filename isn't passed to prefixIds plugin.");
done(/in_svg__/.test(svgOut) ? null : 'filename isn\'t passed to prefixIds plugin.');
fse.removeSync('temp.svg');
}, error => done(error));
});
Expand All @@ -195,7 +195,7 @@ describe('coa', function() {
}).then(function() {
const mpSvgOut = fs.readFileSync('temp.svg', 'utf8');

done(mpSvgOut === mpSvgExp ? null : "Multipass wasn't properly used.");
done(mpSvgOut === mpSvgExp ? null : 'Multipass wasn\'t properly used.');
fse.removeSync('temp.svg');
}, error => done(error));
});
Expand All @@ -211,7 +211,7 @@ describe('coa', function() {
}).then(function() {
const mpSvgOut = fs.readFileSync('temp.svg', 'utf8');

done(!/in_svg__in_svg__/.test(mpSvgOut) ? null : "prefixIds plugin doesn't detect subsequent passes with multipass enabled.");
done(!/in_svg__in_svg__/.test(mpSvgOut) ? null : 'prefixIds plugin doesn\'t detect subsequent passes with multipass enabled.');

// https://github.com/svg/svgo/issues/659
// https://github.com/svg/svgo/issues/1133
Expand All @@ -233,7 +233,7 @@ describe('coa', function() {
}).then(function() {
const mpSvgOut = fs.readFileSync('temp.svg', 'utf8');

done(!/aria-hidden="true" aria-hidden='true'/.test(mpSvgOut) ? null : "addAttributesToSVGElement plugin doesn't correctly handle subsequent passes with multipass enabled.");
done(!/aria-hidden="true" aria-hidden='true'/.test(mpSvgOut) ? null : 'addAttributesToSVGElement plugin doesn\'t correctly handle subsequent passes with multipass enabled.');

// https://github.com/svg/svgo/issues/659
// https://github.com/svg/svgo/issues/1133
Expand Down

0 comments on commit b5357d3

Please sign in to comment.