Skip to content

Commit

Permalink
fix thing i definitely didn't just break
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocean-OS committed Dec 1, 2024
1 parent 1654449 commit b1f409c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/svelte/src/internal/client/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -990,15 +990,14 @@ function get_parent_context(component_context) {
* @returns {T}
*/
export function update(signal, d = 1) {
//@ts-ignore
var value = +get(signal);
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 @@ -1011,12 +1010,14 @@ export function update(signal, d = 1) {
* @returns {T}
*/
export function update_pre(signal, d = 1) {
//@ts-ignore
var value = +get(signal);
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 b1f409c

Please sign in to comment.