@@ -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 */
147147function 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
284284module . exports = {
285285 getClassName,
286- getClosetVariableDeclaration ,
286+ getClosestVariableDeclaration ,
287287 getEmberObjectCallExpressions,
288288 getEmberObjectProps,
289289 getExpressionToReplace,
0 commit comments