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

What is Framer? Join the Community
Return to index
Blaine Billingsley
Posted Jun 15 - Read on Facebook

Trying to get better about modularizing common components, and I'm running into this weird thing "Maximum call size exceeded" error when writing getters and setters. What am I doing wrong?


Radek Kyselý

I'm probably not the one who will answer it profoundly, but this error means the called function calls another function till infinity and since they run synchronously and wait for each other to complete, they hit some limit (call stack size).

In your setter, you are literally trying to set the setter itself. Note that your class has a property @options.checked (this.options.checked) and you are creating getter/setter for @checked (this.checked) property. So when you're trying to set @checked = boolean, you're calling this function over and over again (kind of inception :D ). It's easy to get this wrong with getters/setters, you just need to update them to @options.checked :)

Read the entire post on Facebook