Skip to content

Commit

Permalink
chore: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dbajpeyi committed Jul 18, 2024
1 parent 3d3133f commit 2f8488c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 22 deletions.
7 changes: 3 additions & 4 deletions dist/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions dist/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/Form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,7 @@ class Form {

get submitButtons () {
const selector = this.matching.cssSelector('submitButtonSelector')
const allButtons = /** @type {HTMLElement[]} */([
...findEnclosedElements(this.form, selector)
])
const allButtons = /** @type {HTMLElement[]} */(findEnclosedElements(this.form, selector))

return allButtons
.filter((btn) =>
Expand Down
1 change: 0 additions & 1 deletion src/Scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class DefaultScanner {
this.options = options
/** @type {number} A timestamp of the */
this.initTimeStamp = Date.now()
this.elementsInShadow = []
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/autofill-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,9 @@ function getActiveElement (root = document) {
*/
function findEnclosedElements (root, selector) {
// Check if there are any normal elements that match the selector
const elements = [...root.querySelectorAll(selector)]
const elements = root.querySelectorAll(selector)
if (elements.length > 0) {
return elements
return Array.from(elements)
}

// Check if there are any shadow elements that match the selector
Expand Down
7 changes: 3 additions & 4 deletions swift-package/Resources/assets/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions swift-package/Resources/assets/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2f8488c

Please sign in to comment.