We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad5aa3d commit dda49b0Copy full SHA for dda49b0
src/parser/import.ts
@@ -77,7 +77,7 @@ export const addImportCore = (
77
): string | undefined => {
78
const { from, what } = fw;
79
80
- const getKey = (from: string): string | undefined => {
+ const getKey = (from: string): string => {
81
if (from[0] == '.') {
82
// An undefined return indicates the import is from 'index.ts' or similar == '.'
83
return relativeTo(rootDir, path, from) || '.';
@@ -104,11 +104,11 @@ export const addImportCore = (
104
.replace(`${baseDir}${sep}`, '');
105
}
106
107
- return undefined;
+ return from;
108
109
};
110
111
- const key = getKey(from) || from;
+ const key = getKey(from);
112
const items = imports[key] || [];
113
114
imports[key] = items.concat(what).filter(isUnique);
0 commit comments