     @observer.disconnect()
 
   requestDocumentPoll: =>
-    if @documentUpdateRequested
+    if @animationFrameRequest?
       @performDocumentPollAfterUpdate = true
     else
       @debouncedPerformDocumentPoll()

# ```
module.exports =
class ViewRegistry
  documentUpdateRequested: false
  documentReadInProgress: false
  performDocumentPollAfterUpdate: false
  debouncedPerformDocumentPoll: null

    @documentReaders = []
    @documentWriters = []
    @documentPollers = []
    if @animationFrameRequest?
      cancelAnimationFrame(@animationFrameRequest)
      @animationFrameRequest = null
    @stopPollingDocument()

  requestDocumentUpdate: ->
    @animationFrameRequest ?= requestAnimationFrame(@performDocumentUpdate)

  performDocumentUpdate: =>
    @animationFrameRequest = null
    writer() while writer = @documentWriters.shift()

    @documentReadInProgress = true
