You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When returning a field containing an ObjectId the returned Object does not contain a valid id-String. When console.logging the direct result on the server the id is not put into ''. So it is actually a hex-number. Obviously the conversion into a string is not done correctly as the resulting string is a direct byte-to-ascii conversion which results in wired characters within the string. It can be corrected by iterating over the result and performing a byte-by-byte 'charCodeAt'-conversion (with zero-padding for numbers < 0x10). Using [email protected].
The text was updated successfully, but these errors were encountered:
When returning a field containing an ObjectId the returned Object does not contain a valid id-String. When console.logging the direct result on the server the id is not put into ''. So it is actually a hex-number. Obviously the conversion into a string is not done correctly as the resulting string is a direct byte-to-ascii conversion which results in wired characters within the string. It can be corrected by iterating over the result and performing a byte-by-byte 'charCodeAt'-conversion (with zero-padding for numbers < 0x10). Using [email protected].
The text was updated successfully, but these errors were encountered: