chore: delete expired location handler from client map (#30574)

This commit is contained in:
Yury Semikhatsky 2024-05-01 13:04:21 -07:00 committed by GitHub
parent 4e2ea2280c
commit ff35f651e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -382,6 +382,8 @@ export class Page extends ChannelOwner<channels.PageChannel> implements api.Page
} }
remove = handler?.times === 0; remove = handler?.times === 0;
} finally { } finally {
if (remove)
this._locatorHandlers.delete(uid);
this._wrapApiCall(() => this._channel.resolveLocatorHandlerNoReply({ uid, remove }), true).catch(() => {}); this._wrapApiCall(() => this._channel.resolveLocatorHandlerNoReply({ uid, remove }), true).catch(() => {});
} }
} }