Created
April 4, 2012 22:15
-
-
Save exortech/2306083 to your computer and use it in GitHub Desktop.
Naive fix for "Cannot call method 'charAt' of undefined" in Less.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getInput(e, env) { | |
if (e.filename && env.filename && (e.filename !== env.filename)) { | |
var baseFilename = basename(e.filename); | |
for (f in parser.imports.contents) { | |
if (parser.imports.contents.hasOwnProperty(f) && f.indexOf(baseFilename) >= 0) { | |
return parser.imports.contents[f]; | |
} | |
} | |
return parser.imports.contents[baseFilename]; | |
} else { | |
return input; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment