From 1fe4a08e717c89e5a565b0b908b39a7a3f653a70 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Fri, 2 Dec 2016 22:03:23 -0500 Subject: [PATCH] lint --- bundler/bundle.js | 2 +- request/request.js | 4 ++-- router/router.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundler/bundle.js b/bundler/bundle.js index 4ac98300..34148951 100644 --- a/bundler/bundle.js +++ b/bundler/bundle.js @@ -130,7 +130,7 @@ function run(input, output) { module.exports = function(input, output, options) { run(input, output) if (options && options.watch) { - fs.watch(process.cwd(), {recursive: true}, function(file, type) { + fs.watch(process.cwd(), {recursive: true}, function(file) { if (typeof file === "string" && path.resolve(output) !== path.resolve(file)) run(input, output) }) } diff --git a/request/request.js b/request/request.js index 8c5d4017..e813446b 100644 --- a/request/request.js +++ b/request/request.js @@ -12,7 +12,7 @@ module.exports = function($window, Promise) { function complete() {if (--count === 0 && typeof oncompletion === "function") oncompletion()} return function finalize(promise) { - var then = promise.then, catcher = promise.catch + var then = promise.then promise.then = function() { count++ var next = then.apply(promise, arguments) @@ -87,7 +87,7 @@ module.exports = function($window, Promise) { if (useBody && (args.data != null)) xhr.send(args.data) else xhr.send() }) - return args.background === true ? promise : finalize(promise) + return args.background === true ? promise : finalize(promise) } function jsonp(args, extra) { diff --git a/router/router.js b/router/router.js index e3e844ea..094e2bf8 100644 --- a/router/router.js +++ b/router/router.js @@ -98,7 +98,7 @@ module.exports = function($window) { for (var i = 0; i < keys.length; i++) { params[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i]) } - resolve(routes[route], params, path, route, !!isRouteChange) + resolve(routes[route], params, path, route, Boolean(isRouteChange)) }) return }