From b3cd4bd7af463180f6e5435a98a94dc6d5de01e9 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Fri, 21 Jan 2011 14:47:26 +0100 Subject: [PATCH] Do not update navi if it's not there and avoid a JS error --- mkdru.client.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mkdru.client.js b/mkdru.client.js index 352cae0..371818e 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -230,16 +230,17 @@ mkdru.limitQuery = function (field, value) { }; mkdru.limitTarget = function (id, name) { - var navi = document.getElementById('mkdru-navi'); - navi.innerHTML = - 'Source: ' - + name + ''; - navi.innerHTML += '
'; mkdru.state.filter = 'pz:id=' + id; mkdru.pollDropDowns(); mkdru.resetPage(); mkdru.hashFromState(); mkdru.search(); + var navi = document.getElementById('mkdru-navi'); + if (!navi) return false; + navi.innerHTML = + 'Source: ' + + name + ''; + navi.innerHTML += '
'; return false; }; -- 1.7.10.4