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
Have been noticing errors popping up from the following provider:
export const dateTimestampProvider: DateTimestampProvider = {
now() {
// Use the variable rather than `this` so that the function can be called
// without being bound to the provider.
return (dateTimestampProvider.delegate || Date).now();
},
delegate: undefined,
};
The delegate is sometimes set as an empty object. That will of course throw an error when '.now()' is called elsewhere. This can be observed when using ReplaySubject (line 100)
The problem here is that I couldn't consistently replicate this issue and I didn't manage to figure out exactly what's going on.
UPDATE:
I managed to find the issue. It was on our side. We were deep merging some objects and managed to change the value of some. This provider being a global value should feature better validation when updating
Expected behaviour
Delegate shouldn't be allowed to be assigned an invalid value. Some kind of validation should be setup when setting the value.
Version
7.8.1
The text was updated successfully, but these errors were encountered:
dcarabott
changed the title
'.now()' is not a function error is thrown when the value of DateTimestampProvider.delegate is an empty object
'.now()' is not a function error is thrown when the value of DateTimestampProvider.delegate is not valid
Dec 4, 2023
Describe the bug
Recently migrated from 6.6.3 to 7.8.1
Have been noticing errors popping up from the following provider:
The delegate is sometimes set as an empty object. That will of course throw an error when '.now()' is called elsewhere. This can be observed when using ReplaySubject (line 100)
The problem here is that I couldn't consistently replicate this issue and I didn't manage to figure out exactly what's going on.
UPDATE:
I managed to find the issue. It was on our side. We were deep merging some objects and managed to change the value of some. This provider being a global value should feature better validation when updating
Expected behaviour
Delegate shouldn't be allowed to be assigned an invalid value. Some kind of validation should be setup when setting the value.
Version
7.8.1
The text was updated successfully, but these errors were encountered: