You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
(Open my REPL link below. This will be way easier to follow)
When using an if,elseif,else statement where the first if uses a function, the second if uses a reactive value and the else block contains a component, the first if will always be evaluated as false.
If the first ifis changed to anything other than a function call it works as expected
If the second if is changed to anything other than a reactive value it works as expected
If the content in the else block does not contain a component, it works as expected
Expected behavior
The first if should evaluate based on the condition, not always be false.
Information about your Svelte project:
Your browser and the version: Chromium 81.0.4044.129
Your operating system: Arch Linux
Svelte version 3.20.1 - 3.22.2
Webpack, storyboard, @babel/preset-env (but note that since this happens in the REPL I don't think any of this is related)
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?
Annoying but easy to work around. Actually figuring out what was causing it was far more of a hassle than the fix. The hardest part is auditing other scenarios where this may come into play since it's not something you can really search for.
The text was updated successfully, but these errors were encountered:
Describe the bug
(Open my REPL link below. This will be way easier to follow)
When using an if,elseif,else statement where the first
if
uses a function, the secondif
uses a reactive value and theelse
block contains a component, the firstif
will always be evaluated as false.if
is changed to anything other than a function call it works as expectedif
is changed to anything other than a reactive value it works as expectedelse
block does not contain a component, it works as expectedLogs
No errors reported
To Reproduce
https://svelte.dev/repl/775ab3e02b6c4ddd99e10ee0822e13b9?version=3
Expected behavior
The first if should evaluate based on the condition, not always be false.
Information about your Svelte project:
Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of Svelte entirely?
Annoying but easy to work around. Actually figuring out what was causing it was far more of a hassle than the fix. The hardest part is auditing other scenarios where this may come into play since it's not something you can really search for.
The text was updated successfully, but these errors were encountered: