JPeer264 / node-rcs-core

Rename css selectors across all files
MIT License
37 stars 7 forks source link

selectorLibrary.set() does not check if the given selector is valid. #76

Closed emilemil1 closed 5 years ago

emilemil1 commented 5 years ago

Using selectorLibrary.set() does not throw any errors if the given selector is incorrectly formatted.

This can easily lead to some funky bugs, for example if you try to do selectorLibrary.setMultiple(selectorLibrary.getAll()) without specifying addSelectorType: true for getAll(). I was essentially doing this when exporting/importing the library to a disk cache, which eventually led to the cache blowing up with tons of invalid selectors that did nothing except slow down the program. It was also a slightly hard to detect error since everything appeared to function normally until you by chance happened to look at the contents of the cache.

JPeer264 commented 5 years ago

dup #75