targetStyles not finding style names
Open
- Dominant language
- JavaScript
- Stars
- 4.5k
- Forks
- 688
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/crabbly/Print.js/blob/7779624571d282f67723464a997a69046d7e277d/src/js/functions.js#L35-L40
When using targetStyles, this function always returns false because typeof value is a string not an object. I believe the intended behavior here is:
```
function targetStylesMatch (styles, value) {
for (let i = 0; i < styles.length; i++) {
if (typeof value !== 'object' && value.indexOf(styles[i]) !== -1) return true
}
return false
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.