Skip to content

Commit f38f816

Browse files
committed
fixup! change to another lib
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 82a4002 commit f38f816

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/functions/usernameToColor/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import type { Color } from '../../utils/colors.ts'
77

8-
import md5 from 'md5'
8+
import md5 from 'crypto-js/md5.js'
99
import { generatePalette } from '../../utils/colors.ts'
1010

1111
/**
@@ -18,7 +18,7 @@ function hashCode(str: string): number {
1818

1919
// Hash a given string, if it is not md5 hash already
2020
if (str.match(/^([0-9a-f]{4}-?){8}$/) === null) {
21-
hash = md5(str)
21+
hash = md5(str).toString()
2222
}
2323

2424
hash = hash.replace(/[^0-9a-f]/g, '')

0 commit comments

Comments
 (0)