File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -245,16 +245,24 @@ def _render(self):
245245 template_dict = LiteralVar .create ({"layout" : {"template" : self .template }})
246246 merge_dicts .append (template_dict ._without_data ())
247247 if merge_dicts :
248- tag .special_props .append (
249- # Merge all dictionaries and spread the result over props.
250- Var (
251- _js_expr = f"{{...mergician({ figure !s} ,"
252- f"{ ',' .join (str (md ) for md in merge_dicts )} )}}" ,
253- ),
248+ tag = tag .set (
249+ special_props = [
250+ * tag .special_props ,
251+ # Merge all dictionaries and spread the result over props.
252+ Var (
253+ _js_expr = f"{{...mergician({ figure !s} ,"
254+ f"{ ',' .join (str (md ) for md in merge_dicts )} )}}" ,
255+ ),
256+ ]
254257 )
255258 else :
256- # Spread the figure dict over props, nothing to merge.
257- tag .special_props .append (Var (_js_expr = f"{ figure !s} " ))
259+ tag = tag .set (
260+ special_props = [
261+ * tag .special_props ,
262+ # Spread the figure dict over props, nothing to merge.
263+ Var (_js_expr = str (figure )),
264+ ]
265+ )
258266 return tag
259267
260268
You can’t perform that action at this time.
0 commit comments