Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Error when using mailgoDirectRender #120

Open
adityaekbote opened this issue Sep 28, 2021 · 2 comments
Open

Error when using mailgoDirectRender #120

adityaekbote opened this issue Sep 28, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@adityaekbote
Copy link

adityaekbote commented Sep 28, 2021

I have initialized mailgo with all the config. But the mailgoDirectRender function is broken.

Uncaught TypeError: Cannot read properties of undefined (reading 'classList') at mailgoPreRender (mailgo.js?0de6:892) at mailgoDirectRender (mailgo.js?0de6:917)

The issue is with this line here:

     if ((_config9 = config) !== null && _config9 !== void 0 && _config9.dark || mailgoElement.classList.contains("dark")) {
...

I guess since i am directly calling the mailgo render via the mailgoDirectRender method, the mailgoElement is not defined and there is no null check present.

@manzinello
Copy link
Owner

Thank you so much for your report, I will work on it!

@manzinello manzinello added the bug Something isn't working label Sep 28, 2021
@manzinello
Copy link
Owner

Hi! I've added a fix for this. I've already built a new version of the script, maybe can you make a check about the fix and tell me if everything works correctly now? Because if everything is fine I will close this issue and I will release a new version of mailgo with also this fix. Thank you.

@manzinello manzinello added the help wanted Extra attention is needed label Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants