Merge branch '5.4'
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 21 Sep 2021 08:55:15 +0000 (10:55 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 21 Sep 2021 08:55:15 +0000 (10:55 +0200)
1  2 
com.woltlab.wcf/templates/headIncludeJavaScript.tpl

index b3653dcc9eae5020641465fc977c41f238d2fa41,b0d0840e615b51aace761e688cfd46de4c9d55b5..947a8e640b6a7900a850798cef6ca9f70d94f5a3
@@@ -212,9 -212,13 +212,12 @@@ window.addEventListener('pageshow', fun
        define.amd = __require_define_amd;
        $.holdReady(true);
        
-       WCF.User.init({@$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}');
+       WCF.User.init(
+               {@$__wcf->user->userID},
+               {if $__wcf->user->userID}'{@$__wcf->user->username|encodeJS}'{else}''{/if}
+       );
  </script>
  
 -{js application='wcf' file='WCF.Like' bundle='WCF.Combined' hasTiny=true}
  {js application='wcf' file='WCF.ACL' bundle='WCF.Combined' hasTiny=true}
  {js application='wcf' file='WCF.Attachment' bundle='WCF.Combined' hasTiny=true}
  {js application='wcf' file='WCF.ColorPicker' bundle='WCF.Combined' hasTiny=true}