[Pkg-javascript-commits] [less.js] 18/50: improving paths determination during file loader, less likely to pass undefined and break node
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:22:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v1.7.1
in repository less.js.
commit 7f8dfae81504353987e788561d818a67266d6969
Author: Dominic Barnes <dbarnes at treetopllc.com>
Date: Mon Apr 14 11:34:57 2014 -0500
improving paths determination during file loader, less likely to pass undefined and break node
---
lib/less/index.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/less/index.js b/lib/less/index.js
index 348a5d8..1421788 100644
--- a/lib/less/index.js
+++ b/lib/less/index.js
@@ -192,8 +192,9 @@ less.Parser.fileLoader = function (file, currentFileInfo, callback, env) {
});
} else {
- var paths = [currentFileInfo.currentDirectory].concat(env.paths);
- paths.push('.');
+ var paths = [currentFileInfo.currentDirectory];
+ if (env.paths) paths.push.apply(paths, env.paths);
+ if (paths.indexOf('.') === -1) paths.push('.');
if (env.syncImport) {
for (var i = 0; i < paths.length; i++) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git
More information about the Pkg-javascript-commits
mailing list