mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 12:31:30 -10:00
Revert incorrect changes from commit 950d9c8a56
Correctly handle null value deserialization in non-generic Deserialize(string, Type) method.
This commit is contained in:
1 parent
6af7989628
commit
ef13507552
2 files changed
+3
-4
No files matched your search
+1
-2
@@ -206,8 +206,7 @@ namespace System.Web.Script.Serialization
|
||||
public object Deserialize (string input, Type targetType) {
|
||||
object obj = DeserializeObjectInternal (input);
|
||||
|
||||
if (obj == null)
|
||||
return Activator.CreateInstance (targetType);
|
||||
if (obj == null) return null;
|
||||
|
||||
return ConvertToType (obj, targetType);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user