Skip to content

Commit

Permalink
Fix debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Sep 30, 2024
1 parent 22a60e7 commit a9aa8f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dottyComputed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ export const dottyComputed = (ref: Ref, path: string, def: any = false) => {
}
},
set(val) {
if (val) {
if (typeof def === "number") {
val = +val;
}

if (val && val !== def) {
let cur = ref.value;
for (const part of parts) {
cur[part] = cur[part] || {};
Expand Down

0 comments on commit a9aa8f7

Please sign in to comment.