From 212a13e57c6d29e6eb070aea6d7037ccf7263a13 Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Thu, 15 Aug 2024 09:38:02 +0100 Subject: [PATCH] build --- packages/svelte/src/internal/client/errors.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/svelte/src/internal/client/errors.js b/packages/svelte/src/internal/client/errors.js index 705aa20fdf..67b5c0550f 100644 --- a/packages/svelte/src/internal/client/errors.js +++ b/packages/svelte/src/internal/client/errors.js @@ -279,34 +279,34 @@ export function rune_outside_svelte(rune) { } /** - * Cannot set prototype of `$state` object + * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`. * @returns {never} */ -export function state_prototype_fixed() { +export function state_descriptors_fixed() { if (DEV) { - const error = new Error(`state_prototype_fixed\nCannot set prototype of \`$state\` object`); + const error = new Error(`state_descriptors_fixed\nProperty descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.`); error.name = 'Svelte error'; throw error; } else { // TODO print a link to the documentation - throw new Error("state_prototype_fixed"); + throw new Error("state_descriptors_fixed"); } } /** - * Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`. + * Cannot set prototype of `$state` object * @returns {never} */ -export function state_descriptors_fixed() { +export function state_prototype_fixed() { if (DEV) { - const error = new Error(`state_descriptors_fixed\nProperty descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.`); + const error = new Error(`state_prototype_fixed\nCannot set prototype of \`$state\` object`); error.name = 'Svelte error'; throw error; } else { // TODO print a link to the documentation - throw new Error("state_descriptors_fixed"); + throw new Error("state_prototype_fixed"); } }