From 37f5b3d642ab78f4281f75d13bf37bc0824eb9ea Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 5 Jul 2020 09:12:45 -0400 Subject: [PATCH] Minor code review re. element picker Avoid potentially adding element twice to the resultset. --- src/js/scriptlets/element-picker.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/scriptlets/element-picker.js b/src/js/scriptlets/element-picker.js index ef6acd6c3..321b6377d 100644 --- a/src/js/scriptlets/element-picker.js +++ b/src/js/scriptlets/element-picker.js @@ -688,8 +688,7 @@ const filterToDOMInterface = (( ) => { src: srcProp, opts: filterTypes[elem.localName], }); - } - if ( + } else if ( typeof elem.currentSrc === 'string' && reFilter.test(elem.currentSrc) ) {