mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Further stylistic tweaks
This commit is contained in:
@@ -64,12 +64,14 @@ namespace Microsoft.AspNetCore.NodeServices
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(responseString);
|
||||
}
|
||||
|
||||
if (typeof(T) != typeof(string))
|
||||
{
|
||||
throw new ArgumentException(
|
||||
"Node module responded with non-JSON string. This cannot be converted to the requested generic type: " +
|
||||
typeof(T).FullName);
|
||||
}
|
||||
|
||||
return (T)(object)responseString;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user