SitePen / dojo-amd-converter

A legacy dojo to AMD conversion utility.
Other
11 stars 5 forks source link

Update handlers.js #37

Open RickyShiJs opened 8 years ago

RickyShiJs commented 8 years ago

Make the dojo.publish support use object (not only array) as the second parameter.

Without this fix, it will throw exception like Unable to process file: /xxx/xxx TypeError: Cannot read property 'range' of undefined at Module.getCodeFrom (/Users/dev/git/dojo-amd-converter/Module.js:172:17) at Array.9 (/Users/dev/git/dojo-amd-converter/handlers.js:497:68) at /Users/dev/git/dojo-amd-converter/processScript.js:39:34 at processPath (/Users/dev/git/dojo-amd-converter/parse.js:78:14) at Array.forEach (native) at processPath (/Users/dev/git/dojo-amd-converter/parse.js:51:32) at Array.forEach (native) at processPath (/Users/dev/git/dojo-amd-converter/parse.js:51:32) at Array.forEach (native) at processPath (/Users/dev/git/dojo-amd-converter/parse.js:51:32)