Skip to content

Commit c6d8088

Browse files
committed
minor fixes
1 parent d681398 commit c6d8088

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/lib/client/adapters/webcontainer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function create(stubs, callback) {
7373
reject(new Error(error.message));
7474
});
7575

76-
const ready_unsub = vm.on('server-ready', (port, base) => {
76+
const ready_unsub = vm.on('server-ready', (_port, base) => {
7777
ready_unsub();
7878
callback(5 / 5, 'ready');
7979
fulfil(base); // this will be the last thing that happens if everything goes well

src/lib/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @type {string} name */
1+
/** @param {string} name */
22
export function get_depth(name) {
33
return name.split('/').length - 1;
44
}

src/routes/assets/media/[...path]/+server.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1+
/** @type {import('./$types').RequestHandler} */
12
export async function GET({ request, params, fetch }) {
23
const request_headers = new Headers();
34

4-
if (request.headers.has('range')) {
5-
request_headers.set('range', request.headers.get('range'));
6-
}
5+
const range = request.headers.get('range');
6+
const if_range = request.headers.get('if-range');
77

8-
if (request.headers.has('if-range')) {
9-
request_headers.set('if-range', request.headers.get('if-range'));
10-
}
8+
if (range) request_headers.set('range', range);
9+
if (if_range) request_headers.set('if-range', if_range);
1110

1211
const response = await fetch(`https://sveltejs.github.io/assets/${params.path}`, {
1312
headers: request_headers

0 commit comments

Comments
 (0)