LinkedInAttic / inject

AMD and CJS dependency management in the browser
http://www.injectjs.com
Other
464 stars 48 forks source link

fix(RulesEngine): Adds support for calling define() with no base URL #291

Closed jakobo closed 10 years ago

jakobo commented 10 years ago

In some scenarios, it's possible to call define() without the base URL being defined. In these scenarios, we were throwing an exception that we couldn't proceed further. This wasn't entirely true. This change uses the location.pathname property as a fallback, and reduces the error to a warning.

This allows named AMD modules to function by including them via a script tag, even though a module root hasn't been configured.