         i className: 'fas fa-ellipsis-v'
 
       if @props.usePortal
-        @portal ?= document.createElement('div')
         createPortal @renderMenu(), @portal
 
       else

    @setState active: !@state.active


  render: =>
    div
      className: 'play-detail-menu'

    @uuid = osu.uuid()
    @menu = createRef()

    @body = document.body
    @portal = document.createElement('div') if props.usePortal
    @portalAdded = false

    @state =
      active: false


  componentDidMount: =>
    $(document).on "turbolinks:before-cache.#{@uuid}", () =>
      @removePortal()


  componentDidUpdate: (_prevProps, prevState) =>
