'x is not a function' for preloaded custom javascript code

  1. My goal:

Use the Preload custom JavaScript (Preload custom JavaScript code and libraries | Retool Docs) code feature on web, in one app.

The preloaded JS code is like the following:

class MyCustomClass {
   static foo(){}
}

window.MyCustomClass = MyCustomClass;

The usage is in na JS query like:

window.MyCustomClass.foo();
  1. Issue:

Until yesterday, the app was working just fine but now all the users are getting this error:

window.MyCustomClass.foo() is not a function
  1. Steps I've taken to troubleshoot:

Tried older versions of the app. I've got the same error in all of them.

  1. Additional info: (Cloud or Self-hosted, Screenshots)

Cloud

I notice that this has to do with static methods. It works when we don't use them.

Hi @micalevisk, I was able to reproduce this yesterday but I believe it's been fixed. Are you still having this issue?

I'm still getting that error:

I see, I'm unable to reproduce it on the current version (3.235).

Is it possible there is a bug or error in your preloaded js that is affecting this? Do any errors show up in the chrome console if you reload the page?

It seems to be fixed now. Thanks for your time!