Closed andyblarblar closed 3 years ago
This only occurs if the ride is immediately removed. If the ride is reloaded from the db, the error does not occur.
It looks like this is caused not by the shared link, but by the trash can delete. The trash can delete doesn't reset the config when empty, preventing the park from becoming 'none'
nvm this is caused by only a single shared ride being deleted by the trash can. It seems to be an issue with the table not rendering, and thus the unsub event not firing.
It looks like swapping https://github.com/andyblarblar/queue_alert/blob/6204f308e5bf37f477b877deccbaa3a35c8a4d8d/queue_alert_frontend/app/src/components/configTable.tsx#L25 with https://github.com/andyblarblar/queue_alert/blob/6204f308e5bf37f477b877deccbaa3a35c8a4d8d/queue_alert_frontend/app/src/components/configTable.tsx#L32 may be solve this, as the config may be saved (and thus not none yet) before its reset. Effects are run in order.
https://github.com/andyblarblar/queue_alert/blob/6204f308e5bf37f477b877deccbaa3a35c8a4d8d/queue_alert_frontend/app/src/components/UseConfigSave.tsx#L22
Not sure why this occurs. Should be related to above line.