 
     onFileChangeCallback =
       _.debounce =>
-        @updatePdf() unless @updating
+        if @updating
+          @fileChanged = true
+        else
+          @updatePdf()
       , 100
 
     disposables.add @file.onDidChange onFileChangeCallback


    atom.views.getView(atom.workspace).dispatchEvent(new Event('pdf-view:current-page-update'));

  updatePdf: ->
    @updating = true
    @container.find("canvas").remove()
    @canvases = []


        @canvases.push(canvas)

      @renderPdf()
    , => @finishUpdate()

  renderPdf: (scrollAfterRender = true) ->
    @centersBetweenPages = []
