if variable not declared, test if null throws error

pull/2695/head
goldquest 2015-06-10 17:18:15 +02:00
parent a0aa9470a3
commit 32ba48835a
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}