Closed fsoft72 closed 1 month ago
Severity
blocking an upgrade
I agree the error message could be better but how is this blocking an upgrade?
I will try to check if it's possible to throw a more descriptive error
It is not blocking the upgrade, but bug levels are "annoying", "blocking upgrade" and "blocking all usages of svelte"... I think this is more than annoying, but not so critical to block all usages of svelte. And tt is not just the error message, it is the fact that it pointed me to debug the wrong part of code. Today I spent a lot of time trying to understand what was wrong inside the component function, when it wasn't it at all.
Describe the bug
During the
<svelte:component>
definition, if a generic function is invoked in the params definition and that function is missing, the error returned issvelte_component_invalid_this_value
, while the component is a perfectly working svelte component.This happens because in:
/svelte/src/internal/client/validate.js
there is this lineif (typeof message === 'string' && message.indexOf('is not a function') !== -1)
that raises the
svelte_component_invalid_this_value();
wronglyReproduction
I have created a REPL here
As you can see on line
33
, the last parameter isundefined
and this throws the errorfunction is not defined
on line27
which will be misinterpreted by SvelteLogs
No response
System Info
Severity
blocking an upgrade