crabbly / crabbly/Print.js

targetStyles not finding style names

Open
#407 0 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.