Permalink
Browse files

Merge pull request #43 from kenhkan/bugfixes

Bugfixes
  • Loading branch information...
2 parents 5f4fcfa + 06f38ad commit ac818fcc07abf10a3cc614efb76a66d86ab44255 @bergie bergie committed Sep 4, 2012
Showing with 9 additions and 2 deletions.
  1. +2 −1 package.json
  2. +2 −0 src/components/ReadGroup.coffee
  3. +4 −0 src/components/RemoveProperty.coffee
  4. +1 −1 src/components/Repeat.coffee
View
@@ -19,7 +19,8 @@
"shell": "=0.0.9",
"cli": ">=0.3.7",
"daemon": "0.4.x",
- "glob": ">=2.0.7"
+ "glob": ">=2.0.7",
+ "underscore": ">=1.3.3"
},
"devDependencies": {
"nodeunit" : ">=0.6.0",
@@ -16,5 +16,7 @@ class ReadGroup extends noflo.Component
@outPorts.out.send @groups.join ':'
@inPorts.in.on 'endgroup', =>
@groups.pop()
+ @inPorts.in.on 'disconnect', =>
+ @outPorts.out.disconnect()
exports.getComponent = -> new ReadGroup
@@ -1,4 +1,5 @@
noflo = require "noflo"
+_ = require 'underscore'
class RemoveProperty extends noflo.Component
constructor: ->
@@ -22,6 +23,9 @@ class RemoveProperty extends noflo.Component
@outPorts.out.disconnect()
removeProperties: (object) ->
+ # Clone the object so that the original isn't changed
+ object = _.clone(object)
+
for property in @properties
delete object[property]
return object
@@ -14,7 +14,7 @@ class Repeat extends noflo.Component
@inPorts.in.on "data", (data) =>
@outPorts.out.send data
@inPorts.in.on "endgroup", =>
- @outPorts.out.endGroup
+ @outPorts.out.endGroup()
@inPorts.in.on "disconnect", =>
@outPorts.out.disconnect()

0 comments on commit ac818fc

Please sign in to comment.