Changed instances of splice to only remove one

This commit is contained in:
Ajay Ramachandran
2020-05-11 18:36:07 -04:00
parent 3fb5c1c14f
commit ac3d27bf88

View File

@@ -59,7 +59,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
componentWillUnmount() {
if (this.configUpdateListener) {
Config.configListeners.splice(Config.configListeners.indexOf(this.configUpdate.bind(this)));
Config.configListeners.splice(Config.configListeners.indexOf(this.configUpdate.bind(this)), 1);
}
}