Skip to content

Commit

Permalink
Fix global scope pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitrohatgi committed Apr 3, 2019
1 parent 1b1ed44 commit ea462e6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/javascript/core/axes/polar.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ wpd.PolarAxes = (function() {

x0, y0, x1, y1, x2, y2, r1, theta1, r2, theta2, dist10, dist20, dist12, phi0, alpha0;

processCalibration = function(cal, is_degrees, is_clockwise, is_log_r) {
let processCalibration = function(cal, is_degrees, is_clockwise, is_log_r) {
var cp0 = cal.getPoint(0),
cp1 = cal.getPoint(1),
cp2 = cal.getPoint(2);
Expand Down Expand Up @@ -109,8 +109,8 @@ wpd.PolarAxes = (function() {
var data = [],
rp, thetap;

xp = parseFloat(pxi);
yp = parseFloat(pyi);
let xp = parseFloat(pxi);
let yp = parseFloat(pyi);

rp = ((r2 - r1) / dist12) *
(Math.sqrt((xp - x0) * (xp - x0) + (yp - y0) * (yp - y0)) - dist10) +
Expand Down
4 changes: 2 additions & 2 deletions app/javascript/core/axes/ternary.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ wpd.TernaryAxes = (function() {
var data = [],
rp, thetap, xx, yy, ap, bp, cp, bpt;

xp = parseFloat(pxi);
yp = parseFloat(pyi);
let xp = parseFloat(pxi);
let yp = parseFloat(pyi);

rp = Math.sqrt((xp - x0) * (xp - x0) + (yp - y0) * (yp - y0));

Expand Down
2 changes: 1 addition & 1 deletion app/tests/date_tests.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
QUnit.module("Date/Time Parsing Tests");
QUnit.test("Date Format", function(assert) {
// yyyy/mm
formatStr = wpd.dateConverter.getFormatString("2017/10");
let formatStr = wpd.dateConverter.getFormatString("2017/10");
assert.equal(formatStr, "yyyy/mm", "yyyy/mm ok");

// yyyy/mm/dd
Expand Down

0 comments on commit ea462e6

Please sign in to comment.