Skip to content

Commit 9be1a82

Browse files
pawelfrasclydin
authored andcommitted
refactor(@schematics/angular): fix typo in "expression" variable name inside "addSymbolToNgModuleMetadata" function
1 parent a175d1f commit 9be1a82

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/schematics/angular/utility/ast-utils.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ export function addSymbolToNgModuleMetadata(
411411
return [];
412412
}
413413

414-
let expresssion: ts.Expression | ts.ArrayLiteralExpression;
414+
let expression: ts.Expression | ts.ArrayLiteralExpression;
415415
const assignmentInit = assignment.initializer;
416416
const elements = assignmentInit.elements;
417417

@@ -421,20 +421,20 @@ export function addSymbolToNgModuleMetadata(
421421
return [];
422422
}
423423

424-
expresssion = elements[elements.length - 1];
424+
expression = elements[elements.length - 1];
425425
} else {
426-
expresssion = assignmentInit;
426+
expression = assignmentInit;
427427
}
428428

429429
let toInsert: string;
430-
let position = expresssion.getEnd();
431-
if (ts.isArrayLiteralExpression(expresssion)) {
430+
let position = expression.getEnd();
431+
if (ts.isArrayLiteralExpression(expression)) {
432432
// We found the field but it's empty. Insert it just before the `]`.
433433
position--;
434434
toInsert = `\n${tags.indentBy(4)`${symbolName}`}\n `;
435435
} else {
436436
// Get the indentation of the last element, if any.
437-
const text = expresssion.getFullText(source);
437+
const text = expression.getFullText(source);
438438
const matches = text.match(/^(\r?\n)(\s*)/);
439439
if (matches) {
440440
toInsert = `,${matches[1]}${tags.indentBy(matches[2].length)`${symbolName}`}`;

0 commit comments

Comments
 (0)