Open charlisi opened 4 years ago
I guess this happens when the nullable instance is null (undefined) due to GetValueOrDefaut being transpiled to || 0. Here is an example with Nullable, where all 2 fields are of this type:
private bool Predicate(AModel model) { return !ANullableDateTime.GetValueOrDefault().Equals(model.ANullableDateTime.GetValueOrDefault())); }
This gets transpiled as in 1.8.1:
_predicate$6: function(model) { return !(this.ANullableDateTime || 0).equals((model.ANullableDateTime || 0)); }
Yielding the runtime error in the console: (this.ANullableDateTime || 0).equals is not a function
Here's a sample project DSharpTestConsoleApp1.zip
I guess this happens when the nullable instance is null (undefined) due to GetValueOrDefaut being transpiled to || 0. Here is an example with Nullable, where all 2 fields are of this type:
This gets transpiled as in 1.8.1:
Yielding the runtime error in the console: (this.ANullableDateTime || 0).equals is not a function