Skip to content

SFC top level await with single-line if condition is being compiled incorrectly #4596

@dsine-de

Description

@dsine-de

Version

3.2.11

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Check the JavaScript console output in the reproduction link.

What is expected?

The console.error() should never be executed.

What is actually happening?

The console.error() is being executed when a single-line if statement is used (it works correctly with if statements that have curly brackets).

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: script-setup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions