Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocean-OS committed Dec 1, 2024
1 parent 93a6753 commit 9343188
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/svelte/src/internal/client/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -992,11 +992,11 @@ function get_parent_context(component_context) {
export function update(signal, d = 1) {
var value = get(signal);

if(typeof value === "bigint") {
if (typeof value === 'bigint') {
//@ts-ignore
set(signal, value + BigInt(d));
return value;
}else {
} else {
//@ts-ignore
set(signal, +value + d);
//@ts-ignore
Expand All @@ -1012,11 +1012,11 @@ export function update(signal, d = 1) {
*/
export function update_pre(signal, d = 1) {
var value = get(signal);
if(typeof value === "bigint") {

if (typeof value === 'bigint') {
//@ts-ignore
return set(signal, value + BigInt(d));
}else{
} else {
//@ts-ignore
return set(signal, +value + d);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/svelte/tests/signals/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,6 @@ describe('signals', () => {
assert.equal($.get(count), 1n);
assert.doesNotThrow(() => $.update_pre(count, -1));
assert.equal($.get(count), 0n);
}
})
};
});
});

0 comments on commit 9343188

Please sign in to comment.