Skip to content

Commit

Permalink
fix(router-store): add safety check to schematic (#2632)
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver authored Jul 26, 2020
1 parent d1891ad commit 255e9e8
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/component/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/data/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/effects/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/entity/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/router-store/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/schematics/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/store-devtools/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/store/schematics-core/utility/visitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function visitDecorator(
}

const [arg] = expression.arguments;
if (!ts.isObjectLiteralExpression(arg)) {
if (!arg || !ts.isObjectLiteralExpression(arg)) {
return;
}

Expand Down

0 comments on commit 255e9e8

Please sign in to comment.