This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Tom Columbus
Posted Feb 19 - Read on Facebook

Can anyone explain why including a print command is making this work, but when I remove it, I get nothing?

2 Comments

Mike Johnson

Double check your indentation.The print call is an extra tab in. I'd need to see the rest of the code to understand what side effect that is causing.

Mike Johnson

Ah, I see. I did a quick test to tinker with it because I wasn't sure. Since the print function is nested one layer deeper than it should be, the function thinks that is all it supposed to execute on and the for loop below it is considered to be not part of the function.

This means it gets run automatically whether you click on anything or not.

See this simplified example, remove the test and you'll see the same results, remove a tab from the print line and it won't get run until the layer is clicked, as it should work.

https://framer.cloud/psKih

Read the entire post on Facebook