@@ -323,6 +323,18 @@ def trim_dict(untrimmed: dict,
323
323
trimmed_value = str (value )
324
324
if trimmed_value and trimmed_value != 'None' :
325
325
as_dict [key ] = trimmed_value
326
+ # MapData -> dict --> object
327
+ elif checkers .is_type (value , 'MapData' ) and to_json and for_export :
328
+ untrimmed_value = value ._to_untrimmed_dict ()
329
+ updated_context = value .__class__ .__name__
330
+ topology = untrimmed_value .get ('topology' , None )
331
+ if topology :
332
+ trimmed_value = topology .to_dict ()
333
+ else :
334
+ trimmed_value = None
335
+
336
+ if trimmed_value :
337
+ as_dict [key ] = trimmed_value
326
338
# HighchartsMeta -> dict --> object
327
339
elif value and hasattr (value , '_to_untrimmed_dict' ):
328
340
untrimmed_value = value ._to_untrimmed_dict ()
@@ -704,7 +716,7 @@ def from_js_literal(cls,
704
716
return cls .from_js_literal (prefixed_str ,
705
717
_break_loop_on_failure = True )
706
718
elif not checkers .is_type (body , 'VariableDeclaration' ):
707
- raise errors .HighchartsVariableDeclarationError ('To parse a JavaScriot '
719
+ raise errors .HighchartsVariableDeclarationError ('To parse a JavaScript '
708
720
'object literal, it is '
709
721
'expected to be either a '
710
722
'variable declaration or a'
@@ -1338,7 +1350,7 @@ def from_js_literal(cls,
1338
1350
return cls .from_js_literal (prefixed_str ,
1339
1351
_break_loop_on_failure = True )
1340
1352
elif not checkers .is_type (body , 'VariableDeclaration' ):
1341
- raise errors .HighchartsVariableDeclarationError ('To parse a JavaScriot '
1353
+ raise errors .HighchartsVariableDeclarationError ('To parse a JavaScript '
1342
1354
'object literal, it is '
1343
1355
'expected to be either a '
1344
1356
'variable declaration or a'
0 commit comments