Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Nov 21, 2024
1 parent 6ea4cb6 commit dc09667
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions crates/module_member_usage/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ impl<'a> ModuleMemberUsageHandler<'a> {
});
}
Expression::TemplateLiteral(_)
| Expression::Identifier(_) => {
| Expression::Identifier(_)
| Expression::LogicalExpression(_) => {
inline_usages.push(Response {
lib_name: source_name.to_string(),
member_name: DYNAMIC_COMPUTED_MEMBER.to_string(),
Expand All @@ -166,11 +167,12 @@ impl<'a> ModuleMemberUsageHandler<'a> {
});
}
_ => {
eprintln!(
"computed_member_expression: {:?}",
computed_member_expression
);
unreachable!()
inline_usages.push(Response {
lib_name: source_name.to_string(),
member_name: UNKNOWN.to_string(),
file_path: self.path_str.clone(),
ast_node: AstNode::new((span.start, span.end), loc),
});
}
},
oxc_ast::ast::MemberExpression::StaticMemberExpression(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shined/source-code-diagnosis",
"version": "0.0.57",
"version": "0.0.58",
"main": "index.js",
"types": "index.d.ts",
"napi": {
Expand Down

0 comments on commit dc09667

Please sign in to comment.