File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -268,11 +268,11 @@ fn migrate_declaration(value: &mut serde_json::Value) {
268268 // top-level nodes). In v2 they are `Vec<Symbol>` where each Symbol
269269 // groups declarations by name — the same structure as the top-level
270270 // Document.symbols. Convert them here.
271- if let Some ( serde_json:: Value :: Object ( def) ) = obj. get_mut ( "def" ) {
272- if let Some ( serde_json:: Value :: Array ( elements) ) = def. remove ( "elements" ) {
273- let symbols = v1_nodes_to_symbols ( elements ) ;
274- def . insert ( " elements" . to_string ( ) , symbols ) ;
275- }
271+ if let Some ( serde_json:: Value :: Object ( def) ) = obj. get_mut ( "def" )
272+ && let Some ( serde_json:: Value :: Array ( elements) ) = def. remove ( "elements" )
273+ {
274+ let symbols = v1_nodes_to_symbols ( elements) ;
275+ def . insert ( "elements" . to_string ( ) , symbols ) ;
276276 }
277277
278278 // v1 TsTypeDef used variant-name content keys (e.g. "keyword": "string"),
You can’t perform that action at this time.
0 commit comments