Fix errors in jshint

This commit is contained in:
sapics 2016-01-09 12:03:42 +09:00
parent d5d4d263f5
commit 8077f228e9
3 changed files with 4 additions and 3 deletions

View file

@ -13,6 +13,7 @@
// Node.js emulation layer of browser based environment, based on node-canvas
// and jsdom.
/*global document:true, window:true, navigator:true, HTMLCanvasElement:true, Image:true */
var jsdom = require('jsdom'),
// Node Canvas library: https://github.com/learnboost/node-canvas
Canvas = require('canvas'),

View file

@ -14,8 +14,8 @@ var Http = {
request: function(method, url, callback, async) {
// Code borrowed from Coffee Script and extended:
async = (async === undefined) ? true : async;
var xhr = new (window.ActiveXObject || XMLHttpRequest)(
'Microsoft.XMLHTTP');
var xhrConstructor = window.ActiveXObject || XMLHttpRequest;
var xhr = new xhrConstructor('Microsoft.XMLHTTP');
xhr.open(method.toUpperCase(), url, async);
if ('overrideMimeType' in xhr)
xhr.overrideMimeType('text/plain');

View file

@ -380,7 +380,7 @@ Path.inject({ statics: new function() {
sides = Base.readNamed(arguments, 'sides'),
radius = Base.readNamed(arguments, 'radius'),
step = 360 / sides,
three = !(sides % 3),
three = sides % 3 === 0,
vector = new Point(0, three ? -radius : radius),
offset = three ? -1 : 0.5,
segments = new Array(sides);