How is a doublespend prevented in the Lightning Network?
Doublespends are not possible, because a payment on LN is only considered finalized once both payment channel owners have revoked the previous state of the payment channel by handing their partner a breach remedy that invalidates the previous state.

Thus, Bob should not hand over whatever service Alice was purchasing until the payment is finalized. Once the payment is finalized, Alice can no longer broadcast the old state without opening herself up to the penalty transaction being broadcast by Bob.