mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
chore(route) "throw()" -> "throw"
This commit is contained in:
parent
2ac5a353aa
commit
0026971da2
1 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue