Skip to content

Commit

Permalink
fix some things
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocean-OS committed Dec 1, 2024
1 parent edf4b35 commit 1654449
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions packages/svelte/src/internal/client/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -990,16 +990,17 @@ function get_parent_context(component_context) {
* @returns {T}
*/
export function update(signal, d = 1) {
var value = get(signal);
//@ts-ignore
var value = +get(signal);

if(typeof value === "bigint") {
//@ts-ignore
set(signal, value + BigInt(d));
}else {
//@ts-ignore
set(signal, +value + d);
set(signal, value + d);
}

//@ts-ignore
return value;
}

Expand All @@ -1010,14 +1011,12 @@ export function update(signal, d = 1) {
* @returns {T}
*/
export function update_pre(signal, d = 1) {
var value = get(signal);
//@ts-ignore
var value = +get(signal);

if(typeof value === "bigint") {
//@ts-ignore
d = BigInt(d);
}else {
//@ts-ignore
value = +value;
}
//@ts-ignore
return set(signal, value + d);
Expand Down

0 comments on commit 1654449

Please sign in to comment.