File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 7474 }
7575 } );
7676
77- headerPolicyRoot = ReactDOM.createRoot(
78- document.getElementById(" header-policy-button" )
79- );
80- headerPolicyRoot.render(
81- React.createElement(PolicyButton, {
82- onClickPolicy: { $header_policy |json_encode} ,
83- popUpPolicy: { $pop_up_policy |json_encode} ,
77+ const policyButtonEl = document.getElementById(" header-policy-button" );
78+ if (policyButtonEl) {
79+ headerPolicyRoot = ReactDOM.createRoot(
80+ policyButtonEl
81+ );
82+ headerPolicyRoot.render(
83+ React.createElement(PolicyButton, {
84+ onClickPolicy: { $header_policy |json_encode} ,
85+ popUpPolicy: { $pop_up_policy |json_encode} ,
8486 } )
85- );
87+ );
88+ }
8689 } );
8790 </script >
8891 <link type =" text/css" href =" { $baseurl } /css/jqueryslidemenu.css" rel =" Stylesheet" />
You can’t perform that action at this time.
0 commit comments