Skip to content

Commit

Permalink
refactor(core): add delimiter constant
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jan 23, 2025
1 parent 37a8a2c commit 33948f7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export class ByReferenceModuleOpaqueKeyFactory
if (this.keyGenerationStrategy === 'random') {
moduleId = this.generateRandomString();
} else {
const delimiter = ':';
moduleId = dynamicMetadata
? `${this.generateRandomString()}:${this.hashString(moduleCls.name + JSON.stringify(dynamicMetadata))}`
: `${this.generateRandomString()}:${this.hashString(moduleCls.toString())}`;
? `${this.generateRandomString()}${delimiter}${this.hashString(moduleCls.name + JSON.stringify(dynamicMetadata))}`
: `${this.generateRandomString()}${delimiter}${this.hashString(moduleCls.toString())}`;
}

originalRef[K_MODULE_ID] = moduleId;
Expand Down

0 comments on commit 33948f7

Please sign in to comment.