# HG changeset patch # User Edouard Tisserant # Date 1611656228 -3600 # Node ID 17a9c7a334f7cc83ac7adf1da94e7f778a5945b8 # Parent e704b04875152e1cda3db3d291f90d7d0536f04a SVGHMI: Fix browser side exception when some widget are not used, and are then discarded and not present in final SVG. In that case JS code was still making reference to discarded widget elements and was raising exception at init. diff -r e704b0487515 -r 17a9c7a334f7 svghmi/widgets_common.ysl2 --- a/svghmi/widgets_common.ysl2 Tue Jan 26 11:14:22 2021 +0100 +++ b/svghmi/widgets_common.ysl2 Tue Jan 26 11:17:08 2021 +0100 @@ -289,7 +289,7 @@ || const "excluded_types", "str:split('Page Lang VarInit')"; -const "included_ids","$parsed_widgets/widget[not(@type = $excluded_types)]/@id"; +const "included_ids","$parsed_widgets/widget[not(@type = $excluded_types) and not(@id = $discardable_elements/@id)]/@id"; emit "declarations:hmi-elements" { | var hmi_widgets = {