Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotnetifyHub NormalizeType -- Possible Invalid if condition #239

Closed
treg opened this issue Mar 31, 2020 · 2 comments
Closed

DotnetifyHub NormalizeType -- Possible Invalid if condition #239

treg opened this issue Mar 31, 2020 · 2 comments
Labels

Comments

@treg
Copy link

treg commented Mar 31, 2020

I think line # 289 should be an && not ||
Currently: else if (!(data.GetType().IsPrimitive || data is string))

Reproduce:
From Client call Action AddUser = data => {}
Server Error:
Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher: Error: Failed to invoke hub method 'Update_VM'.

Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path '', line 1, position 20.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json)
at DotNetify.DotNetifyHub.NormalizeType(Object data)

@dsuryd dsuryd added the bug label Apr 14, 2020
@dsuryd
Copy link
Owner

dsuryd commented Apr 14, 2020

Thank you for reporting the bug. The error isn't from line #289, but line #285. It'll be fixed in the next release.

@dsuryd
Copy link
Owner

dsuryd commented May 14, 2020

Fixed in v3.7.

@dsuryd dsuryd closed this as completed May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants