     return unless ship_id > 0
     admiral_id = parseInt(window._nickNameId) || 0
     server = SERVERS[(ship_id + admiral_id) % SERVERS.length]
-    shipFilename = @state.shipgraph[ship_id]?.api_filename
+    shipFilename = @state.shipgraph?[ship_id]?.api_filename
     return unless server
     return unless shipFilename
     for key, id of CONFIG


module.exports =
  reactClass: SecretaryArea
  pluginDidLoad: ->
    window.dispatchEvent new Event 'secretary.load'
  pluginDidUnload: ->
    window.dispatchEvent new Event 'secretary.unload'


  handleDisable: ->
    for key, id of CONFIG
      config.set(key)
    config.set('plugin.secretary.ship', -1)
    @setState
      notifySecretary: -1
