Read the statement by Michael Teeuw here.
Obj.constructor is not a function
-
Hi all,
I have programmed a new module and get this error message in the browser:
class.js:79 Uncaught TypeError: obj.constructor is not a function at cloneObject (class.js:79) at cloneObject (class.js:81) at Function.Module.create (module.js:435) at afterLoad (loader.js:122) at loader.js:137 at HTMLScriptElement.script.onload (loader.js:184)This comes up directly after
Module registered: MMM-testmoduleThe mirror then does not start.
When I disable the module in the config, the message vanishes and the mirror starts properly.Never seen that before. Does anybody know where this comes from?
Config entry:
{ //disabled: true, module: "MMM-testmodule", position: 'top_left', config: { }, }, -
@lavolp3 no… can u post your module on gh so I can download it?
I created a small sample, using same names… it loaded ok…
but the js file has no useful content…
-
@sdetweil I have found the problem.
I had implemented an emtpy Object in the main module:
Module.register("MMM-testmodule", { defaults: { ... }, loading: true, fetchedData: Object.create(null),It didn’t like the Object for some reason.
But thanks Sam for offering help! You’re a real lighthouse around here!
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