1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-08 09:32:07 +01:00

convert nodelist to array

This commit is contained in:
Kyle Spearrin 2017-10-11 22:11:34 -04:00
parent 171c9f324d
commit 0656e732fe

View File

@ -551,8 +551,9 @@
function getFormElements(theDoc, limit) {
var els = [];
try {
els = theDoc.querySelectorAll('input:not([type="hidden"]):not([type="submit"]):not([type="reset"])' +
var elsList = theDoc.querySelectorAll('input:not([type="hidden"]):not([type="submit"]):not([type="reset"])' +
':not([type="button"]):not([type="image"]):not([type="file"]), select');
els = Array.prototype.slice.call(elsList);
} catch (e) { }
return limit && els.length > limit ? els.slice(0, limit) : els;