wip
This commit is contained in:
@@ -75,13 +75,13 @@ function extractImportModule(line: string): string | null {
|
||||
// Handle: import ... from 'x';
|
||||
const fromMatch = trimmed.match(/from\s+['"](.*)['"]/);
|
||||
if (fromMatch) {
|
||||
return fromMatch[1];
|
||||
return fromMatch[1] || null;
|
||||
}
|
||||
|
||||
// Handle: import 'x';
|
||||
const sideEffectMatch = trimmed.match(/^import\s+['"](.*)['"]\s*;?$/);
|
||||
if (sideEffectMatch) {
|
||||
return sideEffectMatch[1];
|
||||
return sideEffectMatch[1] || null;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user