Auto completion for script stops working

I have experienced this issue before but it came about again and I can’t quite figure out where the issue is coming from.

Essentially what happens, is somewhere along the code writing process, the auto completion bar above the keyboard stops working.

I thought maybe an issue with the script file itself, but copying the script as text and pasting into a newly created script resulted in the same.

Have you seen this before? Is there a fix or known cause?

I had the same issue when I wrote

try {
  // something
} catch {
  // something
}

I thought that this is valid javascript since it ran without problems but after figuring it out by accident and looking up the syntax it turns out that it isn’t. It should be

try {
  // something
} catch (err) {
  // something
}

even when you don’t use the error in the catch block.

If this isn’t the case for you, please post your code that stopped the auto completion from working.

4 Likes

That was exactly it! Great that I learned something so early in the day :smiley:

Thank you so much!

That was my issue too :see_no_evil::joy:
Thanks for the answer !

1 Like