ejs-playground
ejs-playground copied to clipboard
Playground becomes unresponsive due to real time execution
This is what I was trying to type
<%
for(let i=0;i<10;i++)
{
%>
<h1> Hello <%-i+1%> </h1>
<%
}
%>
And I typed closing bracket before typing contents inside it.
when I reached after i<10;
it becomes valid and an infinite loop (without increment section)
<%
for(let i=0;i<10;)
{
}
%>
Copy pasting the whole for(let i=0;i<10;i++)
is not a problem, only when reaching for(let i=0;i<10;)
, I guess some people also type closing brackets along with opening brackets before typing the contents.
After typing the semicolon in i<10;
as I said the whole tab is unresponsive (can't type anything in the editor of playground) due to the infinite loop, refreshing the page doesn't work either, you will have to close the tab.
It took me some minutes to figure out why the editor was getting stuck , and it gets stuck when I reaches the specific line.
I am not saying that this is a big issue, I just wanted to let you know about this.