Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function _setRepeatListener( survey ) {
//Instantiate only once, after loadMedia has been completed (once)
survey.$form[ 0 ].addEventListener( events.AddRepeat().type, event => {
_loadMedia( survey, $( event.target ) );
} );
return Promise.resolve( survey );
}