From 7ca2e1d282a8f7a2ee5ecd8bc86507ee3aefe1fa Mon Sep 17 00:00:00 2001 From: Marius Hein Date: Fri, 13 Feb 2015 11:45:20 +0100 Subject: [PATCH] Fix close button: Test the anchor if it belongs to us --- public/js/icinga/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/events.js b/public/js/icinga/events.js index 49c23437d..1ec7c82be 100644 --- a/public/js/icinga/events.js +++ b/public/js/icinga/events.js @@ -413,7 +413,8 @@ event.preventDefault(); // This is an anchor only - if (href.substr(0, 1) === '#' && href.substr(1, 1) !== '!') { + if (href.substr(0, 1) === '#' && href.length > 1 + && href.substr(1, 1) !== '!') { self.handleAnchor(href); return; }