Skip to content

Commit 1654449

Browse files
committed
fix some things
1 parent edf4b35 commit 1654449

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -990,16 +990,17 @@ function get_parent_context(component_context) {
990990
* @returns {T}
991991
*/
992992
export function update(signal, d = 1) {
993-
var value = get(signal);
993+
//@ts-ignore
994+
var value = +get(signal);
994995

995996
if(typeof value === "bigint") {
996997
//@ts-ignore
997998
set(signal, value + BigInt(d));
998999
}else {
9991000
//@ts-ignore
1000-
set(signal, +value + d);
1001+
set(signal, value + d);
10011002
}
1002-
1003+
//@ts-ignore
10031004
return value;
10041005
}
10051006

@@ -1010,14 +1011,12 @@ export function update(signal, d = 1) {
10101011
* @returns {T}
10111012
*/
10121013
export function update_pre(signal, d = 1) {
1013-
var value = get(signal);
1014+
//@ts-ignore
1015+
var value = +get(signal);
10141016

10151017
if(typeof value === "bigint") {
10161018
//@ts-ignore
10171019
d = BigInt(d);
1018-
}else {
1019-
//@ts-ignore
1020-
value = +value;
10211020
}
10221021
//@ts-ignore
10231022
return set(signal, value + d);

0 commit comments

Comments
 (0)