Skip to content

Commit 4bb42d8

Browse files
committed
fixup! fix(@angular-devkit/schematics): do not ignore TypeErrors thrown by content templates
1 parent 15e8337 commit 4bb42d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/angular_devkit/schematics/src/rules

‎packages/angular_devkit/schematics/src/rules/template.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function applyContentTemplate<T>(options: T): FileOperator {
5656

5757
let decodedContent: string;
5858
try {
59-
decodedContent = decoder.decode(content).replace(/\r?\n/g, EOL);
59+
decodedContent = decoder.decode(content);
6060
} catch (e) {
6161
// The second part should not be needed. But Jest does not support instanceof correctly.
6262
// See: https://github.com/jestjs/jest/issues/2549
@@ -69,6 +69,7 @@ export function applyContentTemplate<T>(options: T): FileOperator {
6969

7070
throw e;
7171
}
72+
decodedContent = decodedContent.replace(/\r?\n/g, EOL);
7273

7374
try {
7475
return {

0 commit comments

Comments
 (0)