Skip to content

Commit 244fb10

Browse files
committed
simplify
1 parent 9343188 commit 244fb10

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,13 +1013,8 @@ export function update(signal, d = 1) {
10131013
export function update_pre(signal, d = 1) {
10141014
var value = get(signal);
10151015

1016-
if (typeof value === 'bigint') {
1017-
//@ts-ignore
1018-
return set(signal, value + BigInt(d));
1019-
} else {
1020-
//@ts-ignore
1021-
return set(signal, +value + d);
1022-
}
1016+
// @ts-expect-error
1017+
return set(signal, d === 1 ? ++value : --value);
10231018
}
10241019

10251020
/**

0 commit comments

Comments
 (0)