From bb26663683a5f4172bf065c35fa086a9fddc444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 23 Apr 2015 10:36:40 +0200 Subject: [PATCH] skip doc links processing if there are none --- src/pfwbged/theme/diazo_resources/static/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pfwbged/theme/diazo_resources/static/main.js b/src/pfwbged/theme/diazo_resources/static/main.js index 52182c3..f6c1067 100644 --- a/src/pfwbged/theme/diazo_resources/static/main.js +++ b/src/pfwbged/theme/diazo_resources/static/main.js @@ -45,6 +45,7 @@ $.pfwbged.doLinearNavigation = function () { var doc_links = JSON.parse(localStorage.getItem('table-documents')); var table_url = window.localStorage.getItem('table-documents-url'); + if (doc_links == null) return; if (typeof(doc_links) != 'object') return; var idx = doc_links.indexOf(window.location.href); if (idx == -1) return;