Chromium Code Reviews| Index: pkg/barback/lib/src/phase.dart |
| diff --git a/pkg/barback/lib/src/phase.dart b/pkg/barback/lib/src/phase.dart |
| index 48fd46f748dc60a865358f0df8487a9e529e0028..e2facf3afe2b1829b598a8b2ba3b9977b6e8bef1 100644 |
| --- a/pkg/barback/lib/src/phase.dart |
| +++ b/pkg/barback/lib/src/phase.dart |
| @@ -148,6 +148,9 @@ class Phase { |
| // Removing [output]'s listeners will cause it to be removed from |
| // [_outputs], so we have to put it back. |
| _outputs[output.output.id] = output; |
| + _outputs[output.output.id].output.whenRemoved.then((_) { |
|
Bob Nystrom
2013/09/05 00:09:55
Instead of "_outputs[output.output.id]" here, can
nweiz
2013/09/05 00:13:09
Done.
|
| + _outputs.remove(output.output.id); |
| + }); |
| _next.addInput(output.output); |
| } |
| return _next; |
| @@ -188,8 +191,9 @@ class Phase { |
| _outputs[asset.id].add(asset); |
| } else { |
| _outputs[asset.id] = new PhaseOutput(this, asset); |
| - _outputs[asset.id].output.whenRemoved |
| - .then((_) => _outputs.remove(asset.id)); |
| + _outputs[asset.id].output.whenRemoved.then((_) { |
| + _outputs.remove(asset.id); |
| + }); |
| if (_next != null) _next.addInput(_outputs[asset.id].output); |
| } |
| } |