Skip to content

Commit 33948f7

Browse files
refactor(core): add delimiter constant
1 parent 37a8a2c commit 33948f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/injector/opaque-key-factory/by-reference-module-opaque-key-factory.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ export class ByReferenceModuleOpaqueKeyFactory
4444
if (this.keyGenerationStrategy === 'random') {
4545
moduleId = this.generateRandomString();
4646
} else {
47+
const delimiter = ':';
4748
moduleId = dynamicMetadata
48-
? `${this.generateRandomString()}:${this.hashString(moduleCls.name + JSON.stringify(dynamicMetadata))}`
49-
: `${this.generateRandomString()}:${this.hashString(moduleCls.toString())}`;
49+
? `${this.generateRandomString()}${delimiter}${this.hashString(moduleCls.name + JSON.stringify(dynamicMetadata))}`
50+
: `${this.generateRandomString()}${delimiter}${this.hashString(moduleCls.toString())}`;
5051
}
5152

5253
originalRef[K_MODULE_ID] = moduleId;

0 commit comments

Comments
 (0)