Skip to content

Commit 970e278

Browse files
dulinrileyfacebook-github-bot
authored andcommitted
Inspector should allow explicit None for delegate_map (#4136)
Summary: Pull Request resolved: #4136 The SDK inspector should allow parsing delegates that have a `None` for their delegate_map. This is explicitly None, and not unspecified, which is why the default of an empty dict didn't work. Use `or {}` to instead detect None. Reviewed By: Olivia-liu Differential Revision: D59298227 fbshipit-source-id: 8503d680acb4c393459ee2956bfd7b9f4725803c
1 parent 28638d7 commit 970e278

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/inspector/_inspector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ def _gen_resolve_debug_handles(
892892

893893
# For delegated events, handles are found via delegateMetadata
894894
event.delegate_backend_name = delegate_metadata.get("name", "")
895-
delegate_metadata_delegate_map = delegate_metadata.get("delegate_map", {})
895+
delegate_metadata_delegate_map = delegate_metadata.get("delegate_map") or {}
896896

897897
# delegate_debug_id can be either int based or string based, therefore we need to check both
898898
debug_handles = delegate_metadata_delegate_map.get(

0 commit comments

Comments
 (0)