Skip to content

Commit

Permalink
Improved instance.callback traffic
Browse files Browse the repository at this point in the history
  • Loading branch information
molda committed May 17, 2019
1 parent 81ffaa6 commit b0142fe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,20 @@ Component.prototype.callback = function(index, data, callback, param) {
if (!conn || !conn[0])
return;

if (self.disabledio.output.indexOf(index) > -1)
return;

FLOW.traffic(self.id, 'output', null, index);

conn = conn[0];
var instance = FLOW.instances[conn.id];

var skip = instance.disabledio.input.indexOf(0) > -1;
FLOW.traffic(instance.id, 'input', !skip);

if (skip)
return;

instance && instance.$events.data && instance.emit('data', data, callback, param);
return self;
};
Expand Down

0 comments on commit b0142fe

Please sign in to comment.