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
Strangely, lines 2 & 3 work fine, but line 1 which seems to do more or less the same thing as line 2 does not:
Uncaught Error: System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.Select[TSource,TResult] (:11690/System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) <0x1c01168 + 0x0001a> in <2e4578bfc56440cca13db140d3ae997a>:0
at Microsoft.AspNetCore.Blazor.Browser.Interop.RegisteredFunction.Invoke[TRes] (:11690/System.String identifier, System.Object[] args) <0x1c00820 + 0x00018> in <92ed9c6772a34798bccecc99cc26cbcd>:0
at :11690/BlazorLogger.Logger.Count () <0x1c003b0 + 0x00006> in <f4f92b4bec764f4ab07179cba15c0d18>:0
at :11690/Sample.Pages.Index.onclickCount () <0x1bff3b8 + 0x00004> in <0f6654494db343ba856c72c5c375f027>:0
at Microsoft.AspNetCore.Blazor.Components.EventHandlerInvoker.Invoke (:11690/Microsoft.AspNetCore.Blazor.UIEventArgs e) <0x1bff148 + 0x00076> in <0d9c96ffc9704aa9b088cbbe138126c6>:0
...
The text was updated successfully, but these errors were encountered:
SteveSandersonMS
changed the title
JS Interop doesnt work with a null argument in certain cases
RegisteredFunction.Invoke<T> should handle receiving 'null' for 'args'
May 3, 2018
I would like to contribute to this project and start by resolving this issue. I checked PRs and didn't see anyone mention that they were fixing this. Since I would like to fix this issue I would like to also create a unit test for this bug but was unsure the right location to add the tests.
This is a bit strange.
This is my JS function:
And defined these two interop functions:
And calling it like so:
Strangely, lines 2 & 3 work fine, but line 1 which seems to do more or less the same thing as line 2 does not:
The text was updated successfully, but these errors were encountered: