fix: strict check input

This commit is contained in:
ycjcl868 2019-02-04 22:55:00 +08:00
parent 777c56a515
commit 6f040b6c40

View File

@ -11,8 +11,8 @@ describe('Form', () => {
// Use origin logic
if (id) {
const input = this.getElementsByTagName('input')[0];
if (input.id === id) {
const [input] = this.getElementsByTagName('input');
if (input && input.id === id) {
return input;
}
}