                     set_doc(@goto_diff(ui.values[0], ui.values[1]))
 
     resize_diff_slider: =>
+        if not @syncstring?
+            return
         new_len = @syncstring.all_versions().length
         if new_len == @length
             return

        @goto_revision()

    render_diff_slider: =>
        @length = @syncstring.all_versions().length
        @revision_num = @length - 1
        # debounce actually setting the document content just a little

        if @revision_num == @length-1 then @forward_button.addClass("disabled") else @forward_button.removeClass("disabled")

    render_slider: =>
        if not @syncstring?
            return
        @length = @syncstring.all_versions().length
        @revision_num = @length - 1
        if @ext != "" and require('./editor').file_associations[@ext]?.opts.mode?
