Open starg09 opened 2 years ago
Thanks! Yeah, the list of files should be filtered and only .svg
files should be processed.
In case you are eager and willing to help out, here’s the place where the file list should be filtered: https://github.com/vaadin/docs/blob/latest/frontend/demo/component/icons/iconset-generator.ts#L221-L236
In case you are eager and willing to help out, here’s the place where the file list should be filtered
Sure, thanks for pointing where to look into! Will try to work out a PR soon 😄
From the documentation, over at Components > Icons > Using a Third-Party Icon Set:
(emphasis added)
However, due to what was (being fair) an user mistake, a folder was selected that held not only the intended svg files, but also a 8MB pdf that was accidentally downloaded in the same directory.
What I'd expect, based on the description, is for only SVG files found in the folder (and nested folders). Instead, the PDF file was not only uploaded, but included as an "icon", generating in turn a broken .js file and crashing the page if one were to try expanding the "Usage and contents" of the file.
As a potential fix, it'd be nice if the upload filtered the selection as to only upload svg files. But a warning if it detects anything strange located in the given folder could also work.
(Off-topic: Besides this one issue, the generator is pretty nice!)