Skip to main content
17-Peridot
September 18, 2020
Question

ES6 syntax error for Javascript Service

  • September 18, 2020
  • 1 reply
  • 1721 views

Hi, 

I found a very strange phenomenon,  the ES6 syntax like "let", "const" work well normally.  But in certain situation,  the Lint will report error, see the attached picture. 

 

The line #315 and #325 define the same variable name , but it's not the root cause.  Changing to different variable name has the same error. 

 

It seems the error occurs when the code lines exceeds about 310, but I'm sure . 

 

seanccc_0-1600413217864.png

 

Regards,

Sean

1 reply

Support
November 4, 2020

Hi @seanccc.

 

If you try declaring this statement once instead of twice, does the behavior change:

 

  let intervalDays = interval;

 

Are there other errors elsewhere that may have a bearing on this one?

 

Regards.

 

--Sharon

seanccc17-PeridotAuthor
17-Peridot
November 8, 2020

Hi Sharon @slangley ,

 

Yes, for example, the code below doesn't declare the variable "j"  twice, but still has the error. 

 

seanccc_0-1604800707333.png