DanielXMoore / Civet

A TypeScript superset that favors more types and less typing

Home Page:https://civet.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing parens in `.-1` access in certain contexts

bbrk24 opened this issue · comments

child.appendChild card.html if card? := engine.board.foundation.asc[i].-1

Actual output:

let ref;
let ref1;
if ((ref1 = ref = engine.board.foundation.asc[i][ref.length - 1]) != null) {
  const card = ref1;
  child.appendChild(card.html);
}

Expected output:

let ref;
let ref1;
if ((ref1 = (ref = engine.board.foundation.asc[i])[ref.length - 1]) != null) {
  const card = ref1;
  child.appendChild(card.html);
}

Fixed in #1263