diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js index 9c4e3c8ba433..d3a3ece9d1e5 100644 --- a/devtools/client/definitions.js +++ b/devtools/client/definitions.js @@ -593,7 +593,10 @@ function createHighlightButton(highlighterName, id) { return highlighter.show({}); }, isChecked(toolbox) { - const highlighter = toolbox.highlighterUtils.getKnownHighlighter(highlighterName); + if (!toolbox.inspector) { + return false; + } + const highlighter = toolbox.inspector.getKnownHighlighter(highlighterName); return highlighter && highlighter.isShown(); }, }; diff --git a/devtools/client/framework/toolbox-highlighter-utils.js b/devtools/client/framework/toolbox-highlighter-utils.js index c2a5441ae51b..9ab21dde097b 100644 --- a/devtools/client/framework/toolbox-highlighter-utils.js +++ b/devtools/client/framework/toolbox-highlighter-utils.js @@ -189,10 +189,6 @@ exports.getHighlighterUtils = function(toolbox) { `creating highlighters by types or ${typeName} is unknown`); }); - exported.getKnownHighlighter = function(typeName) { - return toolbox.inspector && toolbox.inspector.getKnownHighlighter(typeName); - }; - // Return the public API return exported; };