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 141cc84 commit 59345c1Copy full SHA for 59345c1
src/vue/__tests__/utils.test.ts
@@ -260,5 +260,9 @@ describe("utils", () => {
260
d: { e: "e" },
261
});
262
263
+
264
+ test("should unref undefined", () => {
265
+ expect(cloneDeepUnref(ref(undefined))).toBe(undefined);
266
+ });
267
268
src/vue/utils.ts
@@ -125,7 +125,7 @@ export function cloneDeep<T>(
125
): T {
126
if (customizer) {
127
const result = customizer(value);
128
- if (result !== undefined) {
+ if (result !== undefined || isRef(value)) {
129
return result as typeof value;
130
}
131
0 commit comments