diff options
| author | Rapptz <[email protected]> | 2021-05-30 12:17:16 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-05-30 12:29:46 -0400 |
| commit | 90a28d48d514135613a783079d18a94d2df2a01c (patch) | |
| tree | f39e67056779b4d3e9426cb19f0897aed453b544 /discord/ui/view.py | |
| parent | Add support for interaction followups (diff) | |
| download | discord.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.py | 2 |
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: |