Skip to content

Commit 7bdebeb

Browse files
santhoshdasari786DominikPieper
authored andcommitted
fix(stencil): Resolve exception when adding Angular output target (#1065)
1 parent 1a96212 commit 7bdebeb

File tree

1 file changed

+13
-13
lines changed
  • packages/stencil/src/stencil-core-utils/lib

1 file changed

+13
-13
lines changed

packages/stencil/src/stencil-core-utils/lib/plugins.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ function addCodeIntoArray(
1515
): StringChange[] {
1616
const nodes = findNodes(source, ts.SyntaxKind.ObjectLiteralExpression);
1717
let node = nodes[0];
18-
const matchingProperties: ts.ObjectLiteralElement[] = node && (
19-
node as ts.ObjectLiteralExpression
20-
).properties
21-
.filter(
22-
(prop: ts.ObjectLiteralElementLike) =>
23-
prop.kind == ts.SyntaxKind.PropertyAssignment
24-
)
25-
.filter((prop: ts.PropertyAssignment) => {
26-
if (prop.name.kind === ts.SyntaxKind.Identifier) {
27-
return (prop.name as ts.Identifier).getText(source) == identifier;
28-
}
18+
const matchingProperties: ts.ObjectLiteralElement[] =
19+
node &&
20+
(node as ts.ObjectLiteralExpression).properties
21+
.filter(
22+
(prop: ts.ObjectLiteralElementLike) =>
23+
prop.kind == ts.SyntaxKind.PropertyAssignment
24+
)
25+
.filter((prop: ts.PropertyAssignment) => {
26+
if (prop.name.kind === ts.SyntaxKind.Identifier) {
27+
return (prop.name as ts.Identifier).getText(source) == identifier;
28+
}
2929

30-
return false;
31-
});
30+
return false;
31+
});
3232

3333
if (!matchingProperties) {
3434
return [];

0 commit comments

Comments
 (0)