fix(image): uncaught error in promise with image handling (#6453)

This commit is contained in:
Nathan Walker
2018-11-13 08:49:37 -08:00
committed by Alexander Vakrilov
parent 8e83a61879
commit 950fdcf5e7
2 changed files with 17 additions and 3 deletions

View File

@ -69,6 +69,11 @@ function ensureImageSource() {
export function request(options: http.HttpRequestOptions): Promise<http.HttpResponse> {
return new Promise<http.HttpResponse>((resolve, reject) => {
if (!options.url) {
reject(new Error("Request url was empty."));
return;
}
try {
var network = domainDebugger.getNetwork();
var debugRequest = network && network.create();