Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot set properties of null (setting 'WarmUpPluginDefaultRole') #352

Closed
wolff453 opened this issue Apr 10, 2024 · 2 comments
Closed

Comments

@wolff453
Copy link

Hi!

I was using the plugin to warm up my functions but I came across a bug. If I don't pass the "role" object in the yml, the plugin gives me an error. However, when I looked at the code, I saw that if there is no role being passed, it creates a default one. The validation that is being done to validate whether the resources object exists is not working, because null is also an object and it can't create the default role because it's not falling for this validation.

In this image, you can see that i'm not passing the role object
image

Error:
image

Error location:

image

Possible correction:
Change this validation and check if is a falsy value instead check the type.

@juanjoDiaz
Copy link
Owner

Interesting...
Can you elaborate on which version of the framework, which version of this plugin and which other plugins are you using?

I wonder what is setting the Resources object to null instead of the default undefined.

@juanjoDiaz
Copy link
Owner

Closing due to no response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants