Results 1 to 3 of 3

Thread: Sencha Cmd 6.5 - Cannot have a destructuring assignment in arrow function arguments

  1. #1
    Sencha Premium User
    Join Date
    Dec 2016
    Location
    Toronto, Canada
    Posts
    33

    Default Sencha Cmd 6.5 - Cannot have a destructuring assignment in arrow function arguments

    This code will return the following error when you try to build:
    Code:
    .then( ({ contractJson }) => {
            view.unmask();
            return this.displayInstrumentTypesMenu(contractJson);
        },
        ...
    )
    [ERR] invalid arrow function parameters => unknown-uri(15, 57)
    [INF] Processing data with CmdJavascriptCompressor

    However if you change it accordingly, it works:
    Code:
    .then( (res) => {
            let { contractJson } = res;
            view.unmask();
            return this.displayInstrumentTypesMenu(contractJson);
        },
        ...
    )
    Chrome seemed to have no problems with destructuring assignments in arrow functions, I think it's meant to be part of the standard: https://developer.mozilla.org/en/doc...ES2015_version

    Great job, I really love the support for ES6. Thanks!

  2. #2
    Sencha Premium User bobringer's Avatar
    Join Date
    Apr 2007
    Location
    New Jersey
    Posts
    88

    Default

    Any chance you tested this in 6.5.1?

    I'm getting similar issues when destructuring an array in 6.5.1, but I thought I saw object destructuring working somewhere else.

  3. #3
    Sencha Premium User
    Join Date
    Dec 2016
    Location
    Toronto, Canada
    Posts
    33

    Default

    Confirm that it's still an issue with 6.5.1.240. Will report it

Similar Threads

  1. Arrow function with default parameter
    By Psychokrameur in forum Sencha Cmd
    Replies: 0
    Last Post: 21 Dec 2016, 12:27 AM
  2. Replies: 1
    Last Post: 30 Dec 2015, 2:06 PM
  3. Replies: 1
    Last Post: 7 Apr 2015, 7:56 AM
  4. how to call a function when click the east region arrow button
    By nelson_siu in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 12 Dec 2007, 5:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •