tjchaplin/mox — pull request #1 by heavysixer (2014-02-21 15:46:18+00:00)
Title: JSHint setters like this: /* global d3: false */ will throw an error in ...

...mox because a ctx object is not created. This commit gracefully falls back to empty strings in those circumstances.

Specifically the error that is thrown is:

Warning: Cannot read property 'name' of undefined Use --force to continue.
TypeError: Cannot read property 'name' of undefined
at doxToMoxComment (/Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:158:30)
at /Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:148:52
at Enumerable.select (/Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/node_modules/yaenumerable/lib/yaenumerable.js:136:18)
at transformToMoxComments (/Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:147:42)
at parseSources (/Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:109:23)
at /Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:36:29
at /Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:88:29
at onItemComplete (/Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/node_modules/yaenumerable/lib/yaenumerable.js:80:6)
at onEachSource (/Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/lib/mox.js:70:13)
at /Users/heavysixer/Desktop/d4/examples/node_modules/grunt-mox/node_modules/mox/node_modules/yaenumerable/lib/yaenumerable.js:86:4