Просмотр исходного кода

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.
Harald Kraemer 11 лет назад
Родитель
Сommit
061bfffd4d
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/app/controllers/graphiteTarget.js

+ 2 - 2
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) {
     };
   });
 
-});
+});