From 9f1789b2d292dac2d8ef7387f500c6dddcb86339 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 6 Feb 2017 14:47:37 +0100 Subject: [PATCH] Fix creation of pads from non-root category in the drive --- www/common/cryptpad-common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) {