diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index dae4c3e62..eefa3a7fc 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -203,7 +203,7 @@ define([ var patharr = window.location.hash.match(/[?&]path=([^&]+)/); var namearr = window.location.hash.match(/[?&]name=([^&]+)/); common.initialPath = patharr[1] || undefined; - common.initialName = namearr[1] ? decodeURIComponent(namearr[1]) : undefined; + common.initialName = namearr && namearr[1] ? decodeURIComponent(namearr[1]) : undefined; window.location.hash = ''; } if (!secretHash && !/#/.test(window.location.href)) {