Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed mistake in last commit where I used EventEmitter#emit instead o…

…f dependency-promise#trigger for triggering the 'loaded' event.
  • Loading branch information...
commit 3c7f56290afc29adf70768aa6bd606a171cb1c7c 1 parent 2d72eed
@bnoguchi authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/browser-require.js
View
5 lib/browser-require.js
@@ -158,7 +158,7 @@ ScriptPromise.prototype.load = function () {
self.src = src;
var depNames = self.depsFor(src);
if (!depNames.length)
- return self.emit('loaded', true);
+ return self.trigger('loaded', true);
var deps = [];
depNames.forEach( function (name) {
ScriptPromise.from(name, self, function (script) {
@@ -239,8 +239,7 @@ exports = module.exports = function exposeRequire (opts) {
url = url.replace(/\.js$/, '');
ScriptPromise.from(url, null, function (script) {
- compileAll(script, function (err, compiled) {
- if (err) return fail(res, err);
+ compileAll(script, function (compiled) {
if (!compiled) return next();
cache[url] = compiled;
Please sign in to comment.
Something went wrong with that request. Please try again.