From 85b8e0cc15c980368286f8a84444e5b7eca8e8b3 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 30 Jan 2013 11:32:00 +0100 Subject: [PATCH] Prevent an error, if OA_source is not defined --- openx.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openx.js b/openx.js index a442f0d..e074a9a 100644 --- a/openx.js +++ b/openx.js @@ -48,8 +48,9 @@ }); } - src += "&nz=1&source=" + escape(OA_source); - src += "&r=" + Math.floor(Math.random()*99999999); + if (typeof OA_source !== 'undefined') + src += "&source=" + escape(OA_source); + src += "&nz=1&r=" + Math.floor(Math.random()*99999999); src += "&block=1&charset=UTF-8"; if (window.location) src += "&loc=" + escape(window.location); -- 2.20.1