Read the statement by Michael Teeuw here.
"dom" variable is undefined
-
I get a console error on start up as follows:
Uncaught TypeError: Cannot read property ‘appendChild’ of undefined. Meaning the dom variable is undefined.
The error points to main.js line 38:
var dom = document.createElement("div"); dom.id = module.identifier; dom.className = module.name; if (typeof module.data.classes === "string") { dom.className = "module " + dom.className + " " + module.data.classes; } dom.opacity = 0; wrapper.appendChild(dom);Everything still works fine, including the custom modules I’ve built, which is actually what drove me to the forum. Since everything works, I’m not actually sure how to debug. Wanted to see if anyone else had this problem or maybe had an easy fix for a fellow perfectionist.
-
Are you running electron app on RasPi or testing in a browser? I had this problem in Chrome when one of the extensions that I had enabled was interfering with MM js
-
@morozgrafix Spot on, I do my dev on my MacBook and test in Chrome. I bet that’s what’s messing with it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login