 
       until packet.type is 'data'
         packet = @get port
+        break unless packet
 
       packet = packet?.data ? undefined
       datas.push packet

        continue if port.indexOf('__') is 0
        continue unless @outPorts.ports[port].isAttached()
        for ip in ips
          @bracketCounter[port]-- if ip.type is 'closeBracket'
          @outPorts[port].sendIP ip
      @outputQ.shift()
    bracketsClosed = true
    for name, port of @outPorts.ports
      if @bracketCounter[port] isnt 0
        bracketsClosed = false
        break
    @autoOrdering = null if bracketsClosed and @autoOrdering is true

exports.Component = Component

  # Handles an incoming IP object
  handleIP: (ip, port) ->
    if ip.type is 'openBracket'
      # Switch component to ordered mode when receiving a stream unless
      # auto-ordering is disabled
      @autoOrdering = true if @autoOrdering is null
    # If port is non-triggering, we can skip the process function call
    return unless port.options.triggering
    if port.name of @forwardBrackets and
    (ip.type is 'openBracket' or ip.type is 'closeBracket')
      # Bracket forwarding
