We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec60ceb commit 08c008dCopy full SHA for 08c008d
1 file changed
src/hooks/useClipboard.ts
@@ -1,3 +1,4 @@
1
+import { cloneDeep } from "es-toolkit";
2
import { isEmpty, remove } from "es-toolkit/compat";
3
import { nanoid } from "nanoid";
4
import {
@@ -32,14 +33,7 @@ export const useClipboard = (
32
33
} as DatabaseSchemaHistory;
34
35
if (files) {
- Object.assign(data, files, {
36
- group: "files",
37
- search: files.value.join(" "),
38
- });
39
- } else if (image) {
40
- Object.assign(data, image, {
41
- group: "image",
42
+ Object.assign(data, files, { group: "files" });
43
} else if (html && !copyPlain) {
44
Object.assign(data, html);
45
} else if (rtf && !copyPlain) {
@@ -48,9 +42,13 @@ export const useClipboard = (
48
const subtype = await getClipboardTextSubtype(text.value);
49
50
Object.assign(data, text, { subtype });
+ } else if (image) {
46
+ Object.assign(data, image, {
47
+ group: "image",
+ });
51
}
52
53
- const sqlData = data;
+ const sqlData = cloneDeep(data);
54
55
const { type, value, group, createTime } = data;
56
0 commit comments