Skip to content

Commit 1f8bc15

Browse files
committed
fix: incorrectly exiting with undefined when dependant function expects URI
Signed-off-by: Jonathan Stevens <jonathan.stevens@resnovas.com>
1 parent 663e247 commit 1f8bc15

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/schema/src/utils/ast-utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ export function resolveImportUri(imp: ModelImport): URI | undefined {
106106
&& !imp.path.startsWith('/') // Respect absolute paths (Unix)
107107
&& !/^[a-zA-Z]:\\/.test(imp.path) // Respect absolute paths (Windows)
108108
) {
109-
imp.path = findNodeModulesFile(imp.path) ?? '';
110-
if (!imp.path) return undefined; // If the path is empty, return undefined
109+
imp.path = findNodeModulesFile(imp.path) ?? imp.path;
111110
}
112111

113112
const dirUri = Utils.dirname(getDocument(imp).uri);

0 commit comments

Comments
 (0)