Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: repeated slides (#7612)

darkskygit5207e7abfc57
diff --git a/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts b/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts
index 8d49498fed..816679a28c 100644
--- a/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts
+++ b/packages/frontend/core/src/blocksuite/presets/ai/slides/template.ts
@@ -150,7 +150,9 @@ const createBasicCover = async (
};
function getRandomElement<T>(arr: T[]): T {
- return arr[Math.floor(Math.random() * arr.length)];
+ return JSON.parse(
+ JSON.stringify(arr[Math.floor(Math.random() * arr.length)])
+ );
}
const basic1section = async (