Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,15 @@ function LinkerPluginShell() {
* @return {LinkerFileRecord} All the data this linker has on the output file.
*/
getFileRecord(uri: string): LinkerFileRecord {
const recordHit = this.fileRegistry.get(uri.toLowerCase());
const key = uri.toLowerCase();
const recordHit = this.fileRegistry.get(key);

if (!recordHit) {
const record: LinkerFileRecord = {
uriFragments: new Set<string>(),
};

this.fileRegistry.set(uri, record);
this.fileRegistry.set(key, record);

return record;
}
Expand Down Expand Up @@ -446,8 +447,6 @@ function LinkerPluginShell() {
createURI(preferredUri: string, outputRelative?: boolean): string {
const uri = this.generateBaseURI(preferredUri);

this.getFileRecord(uri);

return this.processInternalURI(uri, {outputRelative});
}

Expand Down Expand Up @@ -520,13 +519,15 @@ function LinkerPluginShell() {
// Append enough underscores to make the filename unique
while (nonUnique) {
if (this.fileRegistry.has(probeKey)) {
probeURI += "_";
probeKey += "_";
probeURI = probeURI.replace(".html", "_.html");
probeKey = probeKey.replace(".html", "_.html");
} else {
nonUnique = false;
}
}

this.getFileRecord(probeURI);

return probeURI;
}

Expand Down