mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Enable the unicorn/prefer-regexp-test
ESLint plugin rule
Please see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md
This commit is contained in:
parent
bf78ccac30
commit
20b9887476
4 changed files with 5 additions and 4 deletions
|
@ -876,7 +876,7 @@ class Doc extends PDFObject {
|
|||
for (const [name, field] of this._fields.entries()) {
|
||||
if (name.startsWith(fieldName)) {
|
||||
const finalPart = name.slice(len);
|
||||
if (finalPart.match(pattern)) {
|
||||
if (pattern.test(finalPart)) {
|
||||
children.push(field);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue