pozil / pub-sub-api-node-client

A node client for the Salesforce Pub/Sub API
Creative Commons Zero v1.0 Universal
70 stars 37 forks source link

Type of `numRequested` should be a number #24

Closed if0s closed 9 months ago

if0s commented 9 months ago

Small Bug Report

Description

If you subscribe to an event using numRequested as a string, it will not trigger the lastevent due to strict equality comparison, but it will still emit the specified number of events. To avoid misunderstanding, it's better to check the type of numRequested, and either throw an error or try to parse it as a number.

Version

3.2.2

pozil commented 9 months ago

Hi @if0s thanks for reporting this, it's indeed a bug. I fixed it in the latest version v3.2.3.