jquery-archive/PEP

Invalid ES5 Code

pladaria opened this issue · 3 comments

In this file keyword const is used:

    if (inTouch.altitudeAngle) {
      const tan = Math.tan(inTouch.altitudeAngle);
      const radToDeg = 180 / Math.PI;
      e.tiltX = Math.atan(Math.cos(inTouch.azimuthAngle) / tan) * radToDeg;
      e.tiltY = Math.atan(Math.sin(inTouch.azimuthAngle) / tan) * radToDeg;
    } else {

And that goes to the bundle:
Selección_007

This can cause problems in older browsers

Great catch! I think ESLint can check for these if we tell it what version of JavaScript we are targeting. Could you take a look at what we need to do in order to enable that?

jht6 commented

The keyword const should be transpiled to var.

You can now use @openagenda/pepjs.