`url` property is not enumerable

We had code like:

const messageWithNewProp = (message) => ({
  newProp: 'newValue'

Then we discovered that when spreading a message object, not all the properties get copied to the new object. Specifically, the url property is lost on a file message.

We’re assuming that the url prop was created with something like: Object.defineProperty(message, 'url', { value: 'http://etc' }).

Is something like this happening, that’s causing the url property to not have a enumerable: true attribute for the object?

Hi @Matthew_Dean,

Welcome to the Sendbird Community. Enumerable is not set on the url property. Per the MDN docs, that causes it to default to false.

I’m not entirely sure what the reason for this is, but it may be related to the fact that the URL includes a users AuthKey.