From 061bfffd4da270ffa6604f9766bab8d257e94bfa Mon Sep 17 00:00:00 2001 From: Harald Kraemer Date: Fri, 25 Apr 2014 16:48:17 +0200 Subject: [PATCH] Fixed an exception when adding a graphite function. The error was that funcDef is just a string parsed from an event like onMouseDown or something like that. This event is turned into a function instance, and the function instance has expected parameters and so forth. However, the number of parameters was actually checked on the funcDef. --- src/app/controllers/graphiteTarget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/controllers/graphiteTarget.js b/src/app/controllers/graphiteTarget.js index a589cd5a293..a7224b2ced6 100644 --- a/src/app/controllers/graphiteTarget.js +++ b/src/app/controllers/graphiteTarget.js @@ -234,7 +234,7 @@ function (angular, _, config, gfunc, Parser) { $scope.moveAliasFuncLast(); $scope.smartlyHandleNewAliasByNode(newFunc); - if (!funcDef.params.length && newFunc.added) { + if (!newFunc.params.length && newFunc.added) { $scope.targetChanged(); } }; @@ -289,4 +289,4 @@ function (angular, _, config, gfunc, Parser) { }; }); -}); \ No newline at end of file +});