willtheorangeguy / willtheorangeguy.github.io

Avoid using lexical declarations in case clauses JS-0054
Anti-pattern
8 months ago8 months old
Unexpected lexical declaration in case block.
 460
 461      case 'image':
 462
 463        function draw(){ 464          pJS.canvas.ctx.drawImage( 465            img_obj, 466            p.x-radius, 467            p.y-radius, 468            radius*2, 469            radius*2 / p.img.ratio 470          ); 471        } 472
 473        if(pJS.tmp.img_type == 'svg'){
 474          var img_obj = p.img.obj;