From f623303c0b3f13a3f925ce8987244205c8223708 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sun, 25 Aug 2019 13:23:42 +0100 Subject: [PATCH] Handle 0 files open for tooltip --- lib/ice-coder.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 3b4cb35..1b28778 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -728,6 +728,12 @@ var ICEcoder = { // Show Function & class params tooltip functionClassParamsTooltip: function(e, area) { if (top.ICEcoder.indexData) { + // If we have no files open, return early + if (top.ICEcoder.openFiles.length === 0) { + get('tooltip').style.display = "none"; + return true; + } + var i; // Get cM instance, and the word under mouse pointer var cM = top.ICEcoder.getcMInstance();