Chakroun-Anas / turbo-console-log

597 stars 141 forks source link

console.log statement being added to wrong line during array destructuring. #121

Closed phiter closed 2 years ago

phiter commented 3 years ago

If I run the command on a object declaration variable, the console.log statement is added after closing the object. But in this specific use case, if I pick the destructured variable of a call to a function that takes an array, the statement is being added to the wrong line:

Peek 2021-02-15 08-59

Code:

const [tags, setTags] = useState<Tag[]>([
    { id: 1, name: 'Apple' },
    { id: 2, name: 'Pear' }
]);
Chakroun-Anas commented 2 years ago

Hello,

Thank you for sharing this use case, i just pushed a fix v2.3.1 can you please check it and get back to me so that we can close this issue? thx.

Chakroun-Anas commented 2 years ago

Not relevant anymore.