requirejs / almond

A minimal AMD API implementation for use after optimized builds
Other
2.42k stars 169 forks source link

throw error when calling define with too few arguments #100

Closed gustavnikolaj closed 9 years ago

gustavnikolaj commented 9 years ago

To remedy the problem described in #99 we've added this patch to the almond we use in production.

It doesn't fix the problem, but it makes it easier for us to debug it and easier to categorize the error reports we get.

Our current feeling is that these errors originate from extensions fiddling around in our web app's context, but it's based on a few reports where we could actually see the extension id in the stack trace.

Even though almond is designed to run require.js applications after they have been built, it makes sense to safe guard it against evil extensions.

jrburke commented 9 years ago

Closing, tracked in #103.