This repository was archived by the owner on Dec 14, 2023. It is now read-only.
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
Format on save issue #1008
Open
Description
The following code, when formatted on save will cause duplicate lines to be inserted:
Before:
let arr = [1,2,3];
arr.indexOf(1)
let cplxArr = [
{id: 1},
{id: 2},
{id: 3}
];
cplxArr.findIndex(el => el.id === 1);
after:
let arr = [1, 2, 3];
arr.indexOf(1);
arr.indexOf(1)
let cplxArr = [{ id: 1 }, { id: 2 }, { id: 3 }];
let cplxArr = [
cplxArr.findIndex((el) => el.id === 1);
This is possibly due to the diffing code here:
ICEcoder/assets/js/icecoder.js
Lines 2180 to 2227 in 51cf24b