Issue #1470: Cleaning up logic on extension detection

This commit is contained in:
Breckin Loggins
2011-07-16 14:42:45 -05:00
parent 3e20622bd5
commit 471cf1d51a
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@
base = path.join(source);
compile = function(source, sourceIndex, topLevel) {
return path.exists(source, function(exists) {
if (topLevel && !exists && source.lastIndexOf(".coffee") === -1) {
if (topLevel && !exists && source.slice(-7) !== '.coffee') {
return compile(source + ".coffee", sourceIndex, topLevel);
}
if (topLevel && !exists) {