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 // Use origin logic
if (id) { if (id) {
const input = this.getElementsByTagName('input')[0]; const [input] = this.getElementsByTagName('input');
if (input.id === id) { if (input && input.id === id) {
return input; return input;
} }
} }