Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5429 closed defect (worksforme)

"Dojo is undefined" error - with patch

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: Core Version: 0.9
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description (last modified by Adam Peller)


On Firefox+Firebug I sometimes see the following error:

Error: dojo is undefined at
if(typeof dojo == "undefined"){

That's line 20 of dojo.js in the source distribution. Now, this is the first instruction in dojo, so of-course dojo is undefined. I'm surprised that Firebug would give an error on a 'typeof' command. In any event, the following change appears to remove the error:


  • if(typeof dojo == "undefined"){

+ if(typeof(dojo)== "undefined"){ }}

It's just brackets, but it seems to make Firebug happy.

I don't know what severity to assign to this. I haven't seen any problems yet, but it always makes me uneasy when my library starts throwing errors.

Change History (7)

comment:1 Changed 14 years ago by guest

Grr... Could someone fix my wiki formatting please? The {{ should be three {'s.

comment:2 Changed 14 years ago by Adam Peller

Description: modified (diff)

comment:3 Changed 14 years ago by James Burke

Hmm, this sort of dojo check has been in the source since the the Dojo 0.4.x builds. I have not heard this as being as a problem before. And it seems like something that should fail consistently and not just sometimes. Perhaps there is another error in the file, and firefox/firebug is logging the wrong line? If this is using a built version of dojo, maybe firebug has trouble finding the line since all the code is on one line?

comment:4 Changed 14 years ago by guest

Hmm. I guess that it could well be a problem with the packaging system. Now that you mention it, the times that I have seen that error have always been with a package build. That could be just a coincidence, since even with a package I do not get the error *all* the time.

It is interesting though, that the error definitely stopped happening when I added the brackets. The most recent package I made was consistently giving me that error, and the brackets made the error vanish.

I don't know what to try next. If the problem is in the packaging, I don't see much chance of finding it.

comment:5 Changed 14 years ago by James Burke

Perhaps if you you can attach a build profile that reproduces the error, that might help me find the issue. Otherwise, I'm not sure what could be causing the issue.

comment:6 Changed 14 years ago by Adam Peller

Resolution: worksforme
Status: newclosed

please reopen with a reproducible case. the parens just had to be a coincidence.

comment:7 Changed 14 years ago by Adam Peller

Milestone: 1.0.3
Note: See TracTickets for help on using tickets.