aboutsummaryrefslogtreecommitdiff
path: root/discord/ui/view.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-05-30 12:17:16 -0400
committerRapptz <[email protected]>2021-05-30 12:29:46 -0400
commit90a28d48d514135613a783079d18a94d2df2a01c (patch)
treef39e67056779b4d3e9426cb19f0897aed453b544 /discord/ui/view.py
parentAdd support for interaction followups (diff)
downloaddiscord.py-90a28d48d514135613a783079d18a94d2df2a01c.tar.xz
discord.py-90a28d48d514135613a783079d18a94d2df2a01c.zip
Fix potential KeyError when removing views
Diffstat (limited to 'discord/ui/view.py')
-rw-r--r--discord/ui/view.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ui/view.py b/discord/ui/view.py
index 81379b32..55806830 100644
--- a/discord/ui/view.py
+++ b/discord/ui/view.py
@@ -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: