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
I noticed that using decorators that have to do with arrays sort and sortBy, if the value provided to the decorator to sort is null or undefined then the decorator errors out at runtime with something similar to cannot call slice() of undefined. I am providing a guarded value now so that the decorator has an empty array as a source at least. But I wonder if the library itself should guard agains these cases? Like maybe do an array check before calling slice here? https://github.com/pzuraq/macro-decorators/blob/master/src/index.ts#L1163
The text was updated successfully, but these errors were encountered:
I noticed that using decorators that have to do with arrays
sort
andsortBy
, if the value provided to the decorator to sort isnull
orundefined
then the decorator errors out at runtime with something similar tocannot call slice() of undefined
. I am providing a guarded value now so that the decorator has an empty array as a source at least. But I wonder if the library itself should guard agains these cases? Like maybe do an array check before calling slice here? https://github.com/pzuraq/macro-decorators/blob/master/src/index.ts#L1163The text was updated successfully, but these errors were encountered: