Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript ternary breaked with await #1519

Closed
Verdier opened this issue Aug 29, 2018 · 1 comment
Closed

Javascript ternary breaked with await #1519

Verdier opened this issue Aug 29, 2018 · 1 comment

Comments

@Verdier
Copy link

Verdier commented Aug 29, 2018

Description

Since version 1.8.1 ternary are badly formatted when used with the await keyword. The space after the : is removed.

Input

The code looked like this before beautification:

async function() {
    return a ? await fn() : b;
}

Expected Output

The code should have looked like this after beautification:

async function() {
    return a ? await fn() : b;
}

Actual Output

The code actually looked like this after beautification:

async function() {
    return a ? await fn(): b;
}

Settings

Default.

@bitwiseman
Copy link
Member

Please try you inputs on https://beautifier.io/ (v1.8.3-rc2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants