From c8fa63594bd64576a20f5561e8e8deedc867d113 Mon Sep 17 00:00:00 2001 From: Martin Loeffler <35120458+golfomania@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:12:39 +0100 Subject: [PATCH] fix: const to let in "the
element" (#546) * changed id from const to let * more const to let changes --- .../01-the-form-element/app-a/src/routes/+page.server.js | 2 +- .../01-the-form-element/app-b/src/routes/+page.server.js | 2 +- .../02-named-form-actions/app-b/src/routes/+page.server.js | 2 +- .../03-form-validation/app-b/src/routes/+page.server.js | 2 +- .../05-customizing-use-enhance/app-b/src/routes/+page.server.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-a/src/routes/+page.server.js b/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-a/src/routes/+page.server.js index 6a0a78d8f..61043a16b 100644 --- a/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-a/src/routes/+page.server.js +++ b/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-a/src/routes/+page.server.js @@ -1,7 +1,7 @@ import * as db from '$lib/server/database.js'; export function load({ cookies }) { - const id = cookies.get('userid'); + let id = cookies.get('userid'); if (!id) { id = crypto.randomUUID(); diff --git a/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-b/src/routes/+page.server.js b/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-b/src/routes/+page.server.js index e36055d78..4fe5d4667 100644 --- a/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-b/src/routes/+page.server.js +++ b/content/tutorial/03-sveltekit/06-forms/01-the-form-element/app-b/src/routes/+page.server.js @@ -1,7 +1,7 @@ import * as db from '$lib/server/database.js'; export function load({ cookies }) { - const id = cookies.get('userid'); + let id = cookies.get('userid'); if (!id) { id = crypto.randomUUID(); diff --git a/content/tutorial/03-sveltekit/06-forms/02-named-form-actions/app-b/src/routes/+page.server.js b/content/tutorial/03-sveltekit/06-forms/02-named-form-actions/app-b/src/routes/+page.server.js index abf15a387..42edcc09f 100644 --- a/content/tutorial/03-sveltekit/06-forms/02-named-form-actions/app-b/src/routes/+page.server.js +++ b/content/tutorial/03-sveltekit/06-forms/02-named-form-actions/app-b/src/routes/+page.server.js @@ -1,7 +1,7 @@ import * as db from '$lib/server/database.js'; export function load({ cookies }) { - const id = cookies.get('userid'); + let id = cookies.get('userid'); if (!id) { id = crypto.randomUUID(); diff --git a/content/tutorial/03-sveltekit/06-forms/03-form-validation/app-b/src/routes/+page.server.js b/content/tutorial/03-sveltekit/06-forms/03-form-validation/app-b/src/routes/+page.server.js index e6157b7c1..41dc94f2f 100644 --- a/content/tutorial/03-sveltekit/06-forms/03-form-validation/app-b/src/routes/+page.server.js +++ b/content/tutorial/03-sveltekit/06-forms/03-form-validation/app-b/src/routes/+page.server.js @@ -2,7 +2,7 @@ import { fail } from '@sveltejs/kit'; import * as db from '$lib/server/database.js'; export function load({ cookies }) { - const id = cookies.get('userid'); + let id = cookies.get('userid'); if (!id) { id = crypto.randomUUID(); diff --git a/content/tutorial/03-sveltekit/06-forms/05-customizing-use-enhance/app-b/src/routes/+page.server.js b/content/tutorial/03-sveltekit/06-forms/05-customizing-use-enhance/app-b/src/routes/+page.server.js index e58ce6b70..f05f751cb 100644 --- a/content/tutorial/03-sveltekit/06-forms/05-customizing-use-enhance/app-b/src/routes/+page.server.js +++ b/content/tutorial/03-sveltekit/06-forms/05-customizing-use-enhance/app-b/src/routes/+page.server.js @@ -2,7 +2,7 @@ import { fail } from '@sveltejs/kit'; import * as db from '$lib/server/database.js'; export function load({ cookies }) { - const id = cookies.get('userid'); + let id = cookies.get('userid'); if (!id) { id = crypto.randomUUID();