mlab-speedtest icon indicating copy to clipboard operation
mlab-speedtest copied to clipboard

`$section` in main.js is evaluated before its corresponding element exists in the DOM

Open RA80533 opened this issue 4 years ago • 0 comments

$section in main.js is evaluated before its corresponding element exists in the DOM

As a result, the functionality associated with the would-be element never executes due a return statement that's guarded by a conditional which always evaluates to true:

https://github.com/m-lab/mlab-speedtest/blob/4cb40a00cc59ad46f8c7c1912461614c2bdc40a7/app/assets/js/main.js#L93-L94

RA80533 avatar Mar 28 '21 03:03 RA80533