Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

fixed bug with cache entries being overwritten when 'module' was registered under 'module/index' #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/stitch.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports.Package = class Package
(function(/*! Stitch !*/) {
if (!this.#{@identifier}) {
var modules = {}, cache = {}, require = function(name, root) {
var path = expand(root, name), module = cache[path], fn;
var path = expand(root, name), module = cache[path] || cache[expand(path, './index')], fn;
if (module) {
return module.exports;
} else if (fn = modules[path] || modules[path = expand(path, './index')]) {
Expand Down