diff --git a/scripts/__mocks__/@dicebear/core.ts b/scripts/__mocks__/@dicebear/core.ts index 41811e2f8d..71a02f19ea 100644 --- a/scripts/__mocks__/@dicebear/core.ts +++ b/scripts/__mocks__/@dicebear/core.ts @@ -1,5 +1,5 @@ export const createAvatar = jest.fn(() => { return { - toDataUri: jest.fn(() => 'mocked-data-uri'), + toDataUriSync: jest.fn(() => 'mocked-data-uri'), }; }); diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index 3e2f818e3f..431c4a875a 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -41,7 +41,7 @@ const Avatar = ({ size: size || 128, seed: name, radius: radius || 0, - }).toDataUri(); + }).toDataUriSync(); }, [name, size]); const svg = avatar?.toString();