chore(route) "throw()" -> "throw"

This commit is contained in:
coderaiser 2015-04-07 02:46:31 -04:00
parent 2ac5a353aa
commit 0026971da2

View file

@ -94,7 +94,7 @@
isRead = lengthTmpl === lenthPath;
if (typeof callback !== 'function')
throw(Error('callback should be function!'));
throw Error('callback should be function!');
if (isRead) {
callback();
@ -109,7 +109,7 @@
files.read(filesList, 'utf8', function(error, files) {
if (error)
throw(error);
throw error;
else
Object.keys(files).forEach(function(path) {
var name = paths[path];
@ -129,13 +129,13 @@
var name, p, isAuth, isFS, path;
if (!request)
throw(Error('request could not be empty!'));
throw Error('request could not be empty!');
if (!response)
throw(Error('response could not be empty!'));
throw Error('response could not be empty!');
if (typeof callback !== 'function')
throw(Error('callback should be function!'));
throw Error('callback should be function!');
name = ponse.getPathName(request);
isAuth = RegExp('^(/auth|/auth/github)$').test(name);