check existence of "path" for browser execution

This commit is contained in:
Cotton Hou
2013-06-22 00:58:30 +08:00
parent b68fd9d76e
commit 7fdac5c3b9

View File

@@ -294,7 +294,7 @@ sourceMaps = {}
# Generates the source map for a coffee file and stores it in the local cache variable.
getSourceMap = (filename) ->
return sourceMaps[filename] if sourceMaps[filename]
return unless path.extname(filename) in extensions
return unless path?.extname(filename) in extensions
answer = compileFile filename, true
sourceMaps[filename] = answer.sourceMap