Merge pull request #1248 from pygy/cleanup-unmount-again

Move otherwise redundant unsubscription
This commit is contained in:
Leo Horie 2016-08-17 13:39:09 -04:00 committed by GitHub
commit 610604e00d

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
}