mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
fix(@angular-devkit/build-angular): error with status code when response code is not 200
During font inlining, a request can return a response status code other than 200. In which case, the contents of the page should not be inlined.
This commit is contained in:
parent
e1efc35e41
commit
21a05d2ea0
@ -120,6 +120,12 @@ export class InlineFontsProcessor {
|
||||
},
|
||||
},
|
||||
res => {
|
||||
if (res.statusCode !== 200) {
|
||||
reject(new Error(`Inlining of fonts failed. ${url} returned status code: ${res.statusCode}.`));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
res
|
||||
.on('data', chunk => rawResponse += chunk)
|
||||
.on('end', () => resolve(rawResponse));
|
||||
|
Loading…
x
Reference in New Issue
Block a user