Skip to content

Commit 62a80b7

Browse files
authored
Set containingUrlUnused when FileImporter returns null (#297)
1 parent bce32f3 commit 62a80b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/importer-registry.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ export class ImporterRegistry<sync extends 'sync' | 'async'> {
209209
return thenOr(
210210
importer.findFileUrl(request.url, canonicalizeContext),
211211
url => {
212-
if (!url) return new proto.InboundMessage_FileImportResponse();
212+
if (!url) {
213+
return new proto.InboundMessage_FileImportResponse({
214+
containingUrlUnused: !canonicalizeContext.containingUrlAccessed,
215+
});
216+
}
213217
if (url.protocol !== 'file:') {
214218
throw (
215219
`FileImporter ${inspect(importer)} returned non-file: URL ` +

0 commit comments

Comments
 (0)