You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -190,28 +209,38 @@ export class JSXElementAnalyzer {
190
209
}
191
210
}catch(e){
192
211
if(einstanceofMalformedBlockPath){
193
-
if(isIdentifier(value.expression.callee)){
194
-
letfnName=value.expression.callee.name;
212
+
if(isIdentifier(callExpr.callee)){
213
+
letfnName=callExpr.callee.name;
195
214
if(isCommonNameForStyling(fnName)){
196
-
thrownewTemplateAnalysisError(`The call to style function '${fnName}' does not resolve to an import statement of a known style helper.`,this.nodeLoc(value.expression));
215
+
thrownewTemplateAnalysisError(`The call to style function '${fnName}' does not resolve to an import statement of a known style helper.`,this.nodeLoc(expression));
197
216
}else{
198
-
thrownewTemplateAnalysisError(`Function called within class attribute value '${fnName}' must be either an 'objstr' call, or a state reference`,this.nodeLoc(value.expression));
217
+
thrownewTemplateAnalysisError(`Function called within class attribute value '${fnName}' must be either an 'objstr' call, or a state reference`,this.nodeLoc(expression));
console.warn(`WARNING: Stray reference to block import (${specifier.local.name}). Imports are removed during rewrite so this will probably be a runtime error. (${filename}:${ref.node.loc.start.line}:${ref.node.loc.start.column}`);
console.warn(`WARNING: Stray reference to block import (${specifier.local.name}). Imports are removed during rewrite so this will probably be a runtime error. (${filename}:${ref.node.loc.start.line}:${ref.node.loc.start.column})`);
157
188
// throw new TemplateAnalysisError(`Stray reference to block import (${specifier.local.name}). Imports are removed during rewrite.`, {filename, ...ref.node.loc.start});
158
189
}
159
190
}
@@ -162,10 +193,20 @@ function detectStrayReferenceToImport(
0 commit comments