Skip to content

Commit 1eb75a7

Browse files
author
Robert Jackson
authored
Fixup typo in method name closet -> closest. (#151)
Fixup typo in method name closet -> closest.
2 parents 779ce3b + 486dfa8 commit 1eb75a7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

transforms/helpers/parse-helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function getVariableName(varDeclaration) {
130130
* @param {CallExpression} eoCallExpression
131131
* @returns {VariableDeclaration}
132132
*/
133-
function getClosetVariableDeclaration(j, eoCallExpression) {
133+
function getClosestVariableDeclaration(j, eoCallExpression) {
134134
const varDeclarations = j(eoCallExpression).closest(j.VariableDeclaration);
135135
return varDeclarations.length > 0 ? varDeclarations.get() : null;
136136
}
@@ -145,7 +145,7 @@ function getClosetVariableDeclaration(j, eoCallExpression) {
145145
* @returns {CallExpression|VariableDeclaration}
146146
*/
147147
function getExpressionToReplace(j, eoCallExpression) {
148-
const varDeclaration = getClosetVariableDeclaration(j, eoCallExpression);
148+
const varDeclaration = getClosestVariableDeclaration(j, eoCallExpression);
149149
const isFollowedByCreate = get(eoCallExpression, 'parentPath.value.property.name') === 'create';
150150

151151
let expressionToReplace = eoCallExpression;
@@ -243,7 +243,7 @@ function replaceEmberObjectExpressions(j, root, filePath, options = {}) {
243243
}
244244

245245
const superClassName = get(eoCallExpression, 'value.callee.object.name');
246-
const varDeclaration = getClosetVariableDeclaration(j, eoCallExpression);
246+
const varDeclaration = getClosestVariableDeclaration(j, eoCallExpression);
247247
const classVariableName = getVariableName(varDeclaration);
248248
const className = getClassName(
249249
j,
@@ -283,7 +283,7 @@ function replaceEmberObjectExpressions(j, root, filePath, options = {}) {
283283

284284
module.exports = {
285285
getClassName,
286-
getClosetVariableDeclaration,
286+
getClosestVariableDeclaration,
287287
getEmberObjectCallExpressions,
288288
getEmberObjectProps,
289289
getExpressionToReplace,

0 commit comments

Comments
 (0)