digidem / mapeo-core

Library for creating custom geo data and syncronizing via a peer to peer network
23 stars 2 forks source link

Fix this.swarm being called when undefined #116

Closed luandro closed 3 years ago

luandro commented 3 years ago
hackergrrl commented 3 years ago

Nice! Could you write a regression test just to convince ourselves that this was actually an issue + this fixes it?

This would be

  1. stashing your fix
  2. writing a test that makes mapeo-core crash (should be as simple as calling leave() /wo starting the swarm)
  3. re-applying your fix
  4. confirming the test now passes

It's maybe kiiinda excessive for this bug, but even just manually verifying that the bug happens + the fix works has helped me catch unexpected bugs before.