Skip to content

Glitch with async / await highlighting #4

Description

@dsl101

I have a Vue component which has 2 very similar methods that use an asynchronous call and then do something when it completes. Note this code works, but the syntax highlighting doesn't work for the second function. The await reserved word is in plain white, not red. I know I could store the return value in the second function before calling $router.push(), but I just want to use the return value directly in the argument to that call. It seems the matcher doesn't recognise await if it is inside parentheses.

async handleCreateEvent (data) {
  await this.createEvent(data)
  this.reloadEventsTrigger = !this.reloadEventsTrigger
},
async handleCreateEventAndOpen (data) {
  this.$router.push('/' + await this.createEvent(data))
},

image

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions