Catch non-protype functions

This commit is contained in:
Kevin Sawicki
2015-03-18 15:18:55 -07:00
parent f728bc7aec
commit 6e464ac35c

View File

@@ -12,7 +12,7 @@ module.exports = (grunt) ->
js = grunt.file.read(jsPath)
method = null
for line, index in js.split('\n')
[match, className, methodName] = /^\s*([a-zA-Z]+)\.prototype\.([a-zA-Z]+)\s*=\s*function\(/.exec(line) ? []
[match, className, methodName] = /^\s*([a-zA-Z]+)\.(?:prototype\.)?([a-zA-Z]+)\s*=\s*function\(/.exec(line) ? []
if className and methodName
method = "#{className}::#{methodName}"
else