Normalise trailing whitespace and line endings everywhere

This commit is contained in:
SteveSandersonMS
2016-03-01 01:10:43 +00:00
parent c425137423
commit 74cac774f8
174 changed files with 782 additions and 783 deletions

View File

@@ -1,5 +1,5 @@
import * as url from 'url';
import * as domain from 'domain';
import * as domain from 'domain';
import * as domainContext from 'domain-context';
import { addTask } from './main';
const isomorphicFetch = require('isomorphic-fetch');
@@ -37,7 +37,7 @@ function issueRequest(baseUrl: string, req: string | Request, init?: RequestInit
if (!init.headers['Connection']) {
init.headers['Connection'] = 'keep-alive';
}
return isomorphicFetch(req, init);
}
@@ -57,6 +57,6 @@ export function baseUrl(url?: string): string {
noDomainBaseUrl = url;
}
}
return domain.active ? domainContext.get(domainTaskStateKey) : noDomainBaseUrl;
}

View File

@@ -38,7 +38,7 @@ export function run<T>(codeToRun: () => T, completionCallback: (error: any) => v
try {
domainContext.set(domainTasksStateKey, state);
synchronousResult = codeToRun();
// If no tasks were registered synchronously, then we're done already
if (state.numRemainingTasks === 0 && !state.hasIssuedSuccessCallback) {
state.hasIssuedSuccessCallback = true;
@@ -48,7 +48,7 @@ export function run<T>(codeToRun: () => T, completionCallback: (error: any) => v
state.completionCallback(ex);
}
});
return synchronousResult;
}