Skip to content

Commit

Permalink
Fixed an issue where ES6 arrow function is not supported by old browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Nov 30, 2017
1 parent 18431c4 commit 45fc6d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ cnc.setDistance = function(distance) {
cnc.sendMove = function(cmd) {
var jog = function(params) {
params = params || {};
var s = _.map(params, (value, letter) => {
var s = _.map(params, function(value, letter) {
return '' + letter + value;
}).join(' ');
controller.command('gcode', 'G91 G0 ' + s); // relative distance
controller.command('gcode', 'G90'); // absolute distance
};
var move = function(params) {
params = params || {};
var s = _.map(params, (value, letter) => {
var s = _.map(params, function(value, letter) {
return '' + letter + value;
}).join(' ');
controller.command('gcode', 'G0 ' + s);
Expand Down

0 comments on commit 45fc6d7

Please sign in to comment.