Skipping icons with non interger width/height
parent
7ea65b0c51
commit
0522e813b3
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webpack-svg-sprite-generator",
|
||||
"version": "1.0.15",
|
||||
"version": "1.0.16",
|
||||
"description": "",
|
||||
"main": "plugin.js",
|
||||
"types": "ts/index.d.ts",
|
||||
|
|
|
@ -294,6 +294,9 @@ export async function generateSprite(files: string[]) : Promise<GeneratedSprite>
|
|||
if(isNaN(width) || isNaN(height)) {
|
||||
console.warn("Skipping SVG %s because of invalid bounds (Parsed: %d x %d, Values: %o).", file, width, height, rootAttributes["viewBox"].split(" "));
|
||||
continue;
|
||||
} else if(Math.floor(width) !== width || Math.floor(height) !== height) {
|
||||
console.warn("Skipping SVG %s because of an non interger height/width (%fx%f)", file, width, height);
|
||||
continue;
|
||||
}
|
||||
|
||||
svg.bounds = {
|
||||
|
|
Loading…
Reference in New Issue