Fix potential KeyError when removing views

This commit is contained in:
Rapptz
2021-05-30 12:29:46 -04:00
parent 7b1c57ed60
commit 90a28d48d5
+1 -1
View File
@@ -383,7 +383,7 @@ class ViewStore:
def remove_view(self, view: View):
for item in view.children:
if item.is_dispatchable():
self._views.pop((item.type.value, item.custom_id)) # type: ignore
self._views.pop((item.type.value, item.custom_id), None) # type: ignore
for key, value in self._synced_message_views.items():
if value.id == view.id: