Move otherwise redundant unsubscription

This commit is contained in:
Pierre-Yves Gerardy 2016-08-17 16:22:44 +02:00
parent a3c273f802
commit 747f2b2847

View file

@ -5,9 +5,9 @@ var autoredraw = require("../api/autoredraw")
module.exports = function(renderer, pubsub) {
return function(root, component) {
pubsub.unsubscribe(root.redraw)
if (component === null) {
renderer.render(root, [])
pubsub.unsubscribe(root.redraw)
delete root.redraw
return
}