From 21898761aaf1d306854ea46dece9841cd5d4d389 Mon Sep 17 00:00:00 2001 From: Ulrik de Muelenaere Date: Sat, 14 Jun 2014 12:28:09 +0200 Subject: [PATCH] Set Loader.prototype.constructor This allows subclass constructors to call the Loader constructor via super. Fixes #153. --- lib/loader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/loader.js b/lib/loader.js index fa6fa9b..57ffe66 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -880,6 +880,7 @@ function logloads(loads) { // importPromises adds ability to import a module twice without error - https://bugs.ecmascript.org/show_bug.cgi?id=2601 var importPromises = {}; Loader.prototype = { + constructor: Loader, define: function(name, source, options) { if (importPromises[name]) throw new TypeError('Module is already loading.');