mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Fixes #140 - Also de-dupe cached taglibs in finder
This commit is contained in:
parent
719f1f86b3
commit
1878dd0109
@ -71,7 +71,15 @@ function tryNodeModules(parent, helper) {
|
||||
if (taglibsForNodeModulesDir !== null) {
|
||||
for (var i = 0, len = taglibsForNodeModulesDir.length; i < len; i++) {
|
||||
var taglib = taglibsForNodeModulesDir[i];
|
||||
helper.addTaglib(taglib);
|
||||
|
||||
var moduleName = taglib.moduleName;
|
||||
if (moduleName && !helper.foundTaglibPackages[moduleName]) {
|
||||
// Fixes https://github.com/marko-js/marko/issues/140
|
||||
// If the same node_module is found multiple times then only load the first one.
|
||||
// Only the package name (that is: node_modules/<module_name>) matters and the
|
||||
// package version does not matter.
|
||||
helper.addTaglib(taglib);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user