File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
src/Umbraco.Deploy.Contrib/Migrators/Legacy/DataType Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
- using System . Text . Json ;
2
1
using System . Text . Json . Nodes ;
3
2
using Umbraco . Cms . Core . Semver ;
4
3
using Umbraco . Deploy . Infrastructure . Artifacts ;
@@ -31,10 +30,17 @@ public override JsonNode Migrate(JsonNode artifactJson)
31
30
32
31
// Convert pre-value serialized JSON to actual JSON objects/arrays
33
32
if ( value is JsonValue jsonValue &&
34
- jsonValue . TryGetValue ( out string ? json ) &&
35
- json . DetectIsJson ( ) )
33
+ jsonValue . TryGetValue ( out string ? json ) )
36
34
{
37
- value = JsonNode . Parse ( json ) ;
35
+ if ( string . IsNullOrEmpty ( json ) )
36
+ {
37
+ // Skip empty value
38
+ continue ;
39
+ }
40
+ else if ( json . DetectIsJson ( ) )
41
+ {
42
+ value = JsonNode . Parse ( json ) ;
43
+ }
38
44
}
39
45
40
46
configuration . Add ( preValue . Key , value ) ;
You can’t perform that action at this time.
0 commit comments