--- 'svelte': patch --- fix: ensure if block is executed in correct order