Skip to content

Commit 5bd6b28

Browse files
authored
fix(Collection): make error messages consistent (#8224)
1 parent f6db285 commit 5bd6b28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/collection/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class Collection<K, V> extends Map<K, V> {
4141
*/
4242
public ensure(key: K, defaultValueGenerator: (key: K, collection: this) => V): V {
4343
if (this.has(key)) return this.get(key)!;
44-
if (typeof defaultValueGenerator !== 'function') throw new TypeError(`${defaultValueGenerator} is not a function.`);
44+
if (typeof defaultValueGenerator !== 'function') throw new TypeError(`${defaultValueGenerator} is not a function`);
4545
const defaultValue = defaultValueGenerator(key, this);
4646
this.set(key, defaultValue);
4747
return defaultValue;

0 commit comments

Comments
 (0)