Question

Super weird issue. Basically, everything works fine development mode but when I run it through dojoBuild, a specific modal is sometimes working and sometimes isn't.

When it's not, it says 'undefined' is not a function, insinuating 'define' is undefined. However, when i check to see that 'define' IS defined, i get a function successfuly returned.

Here's the declaration part of the modal in question (it's being used twice on the page):

1 define([ 2 "dojo", 3 "dojo/_base/declare", 4 "dojo/_base/lang", 5 "myapp/js/utils/globals" 13 ], function ( 14 dojo, 15 declare, 16 lang, 17 globals 25 ) { Anyone see this before or know of anything that might be going on? Would any more files be helpful?

Here is my profile if that helps too.

define is defined, man!

Was it helpful?

Solution

Okay, so this actually had nothing to do with dojoBuild itself but more to do with the error reporting.

The error was actually inside of the module, but when dojoBuild ran and compressed it, I'm guessing that when it errored, it defaulted the reporting to line 1 of the uncompressed file, which made me believe it was the define function that was undefined when really it was something else.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top