From 32ba48835a753b3c7f85ec7db1318fcd91fd1484 Mon Sep 17 00:00:00 2001 From: goldquest Date: Wed, 10 Jun 2015 17:18:15 +0200 Subject: [PATCH] if variable not declared, test if null throws error --- src/static/js/pad.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/js/pad.js b/src/static/js/pad.js index e820b76fe..6ee39b6b7 100644 --- a/src/static/js/pad.js +++ b/src/static/js/pad.js @@ -467,7 +467,7 @@ var pad = { { var newHref = new RegExp(/.*\/p\/[^\/]+/).exec(document.location.pathname) || clientVars.padId; newHref = newHref[0]; - if (options != null){ + if (typeof options != "undefined" && options != null){ newHref = newHref + '?' + options; }