requirejs / almond

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

unsafe String split #104

Closed ballPointPenguin closed 9 years ago

ballPointPenguin commented 9 years ago

I'm getting a lot of this:

TypeError: baseName.split is not a function

when baseName is undefined. Maybe this is my fault somehow, but it seems like there could be a check in place if baseName is not a String.

jrburke commented 9 years ago

Thta is a curious error. With the latest almond version, that is only done in one place, and not sure how the baseName could not be a string or a falsey value. If you have a test case I can try, I can figure out why that baseName is not what is expected, that would help inform a fix.

ballPointPenguin commented 9 years ago

I think it only happens when requiring an invalid library or file. I'll see if I can re-create a minimal failing case, but I'm not yet convinced that there is a bug here.

jrburke commented 9 years ago

Going to close for now, but please feel free to post more information here and we can reopen later as needed. In #103, part of a soon to be released 0.3.1, an error is thrown now if the define()'d name is not a string, so that may help identify the issue.