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

Invalid shifting with JavaScript objects #48

Open
patric-eberle opened this issue Feb 5, 2020 · 0 comments
Open

Invalid shifting with JavaScript objects #48

patric-eberle opened this issue Feb 5, 2020 · 0 comments

Comments

@patric-eberle
Copy link

Shifter: 1.9.6

When sorting a JavaScript object, the code gets messed up, unless only ES2015 shorthand definition or primitive key/value pairs are used.

Case 1:

const foo = {
  userRights,
  cWishLists: cWishLists.getAllWishLists,
  cVariantSelector,
};

This one works, as long as I only select the inner rows of the object.

Case 2:

const foo = {
  baa: {
    foo: 'baa',
  },
  userRights,
  cWishLists: cWishLists.getAllWishLists,
  cVariantSelector,
};

This one fails and produces the following result:

const foo = {
  foo: 'baa',
  baa: {
    cVariantSelector,
    cWishLists: cWishLists.getAllWishLists,
    userRights,
  },
};

Selecting the whole variable fails entirely (which I think may be OK...)

cVariantSelector,
  cWishLists;
:
cWishLists.getAllWishLists,
  userRights,
const foo = {};

Grüäss us Sanggallä 😃

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

No branches or pull requests

1 participant