mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-25 11:07:29 +00:00
Normalise trailing whitespace and line endings everywhere
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user