Skip to content

Commit aa723dc

Browse files
committed
tidy
1 parent d377df7 commit aa723dc

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

packages/svelte/src/internal/client/dom/blocks/async.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { get_boundary } from './boundary.js';
2020
export function async(node, expressions, fn) {
2121
var boundary = get_boundary();
2222
var batch = /** @type {Batch} */ (current_batch);
23-
2423
var blocking = !boundary.is_pending();
2524

2625
boundary.update_pending_count(1);

packages/svelte/src/internal/client/reactivity/async.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** @import { Effect, TemplateNode, Value } from '#client' */
2-
import { DESTROYED, STALE_REACTION } from '#client/constants';
2+
import { DESTROYED } from '#client/constants';
33
import { DEV } from 'esm-env';
44
import {
55
component_context,
@@ -218,7 +218,6 @@ export function unset_context() {
218218
export async function async_body(anchor, fn) {
219219
var boundary = get_boundary();
220220
var batch = /** @type {Batch} */ (current_batch);
221-
222221
var blocking = !boundary.is_pending();
223222

224223
boundary.update_pending_count(1);

packages/svelte/tests/runtime-runes/samples/async-resolve-stale/_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default test({
2121
input.dispatchEvent(new Event('input', { bubbles: true }));
2222
await sleep();
2323
assert.htmlEqual(target.innerHTML, '<input> 3 | 12');
24+
2425
input.value = '';
2526
input.dispatchEvent(new Event('input', { bubbles: true }));
2627
await sleep();

packages/svelte/tests/runtime-runes/samples/async-resolve-stale/main.svelte

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,30 @@
44
55
let resolver;
66
7-
function asd(v) {
7+
function asd(v) {
88
let r = Promise.withResolvers();
99
10-
function update_and_resolve(){
10+
function update_and_resolve() {
1111
count++;
1212
r.resolve(v);
1313
}
1414
1515
// make sure the second promise resolve before the first one
16-
if(resolver){
16+
if (resolver){
1717
new Promise(r => {
1818
setTimeout(r);
19-
}).then(update_and_resolve).then(()=>{
20-
setTimeout(()=>{
19+
}).then(update_and_resolve).then(() => {
20+
setTimeout(() => {
2121
resolver();
2222
resolver = null;
2323
});
2424
});
25-
}else if(v){
25+
} else if (v) {
2626
resolver = update_and_resolve;
27-
}else{
27+
} else {
2828
Promise.resolve().then(update_and_resolve);
2929
}
30+
3031
return r.promise;
3132
}
3233

0 commit comments

Comments
 (0)