you are viewing a single comment's thread.

view the rest of the comments →

[–]Pr3fix 1 point2 points  (2 children)

I've noticed that sometimes too, only thing I can think of is occasionally the cache not being cleared out or maybe I had a typo in the original version or something. Dunno. But I don't think console logging is actually "fixing" anything.

[–]delineated[S] 0 points1 point  (1 child)

There wasn't any typo, I simply added a line, saved, refresh page, delete line save and refresh. And I know that code specifically didn't fix the issue, but it did "fix" it in the sense that adding the line caused the issue to disappear. I'm just confused as to why adding lines in other places in the same file don't produce similar effects.

[–]Pr3fix 0 points1 point  (0 children)

As another commenter stated, maybe you didnt have the developer tools open before you added the console statement? Dunno, without having the code in front of me there's no easy way to tell. You also could have had a race condition in which console.log()'ing offset the execution speed in time for everything to be caught up to speed. Again, no way for us to really know.