From 6e464ac35c6e35cd6c2f0283fa74a2c66d325872 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 18 Mar 2015 15:18:55 -0700 Subject: [PATCH] Catch non-protype functions --- build/tasks/output-for-loop-returns.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/output-for-loop-returns.coffee b/build/tasks/output-for-loop-returns.coffee index 47523aa45..f9b036120 100644 --- a/build/tasks/output-for-loop-returns.coffee +++ b/build/tasks/output-for-loop-returns.coffee @@ -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