From b8dc685d01852d44e46ac9c391cbaf666046dfd0 Mon Sep 17 00:00:00 2001 From: Mathias Rangel Wulff Date: Fri, 9 Sep 2016 15:54:41 +0200 Subject: [PATCH] Identify Map correctly (#1972) Using Google bigquery I found that your code was comparing the result of `typeof` with a variable named `undefined`. As typeof returns a string it should compare to a string with the content `'undefined'` --- src/js/logger-ui-inspector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/logger-ui-inspector.js b/src/js/logger-ui-inspector.js index 9df42b1ed..57f358d36 100644 --- a/src/js/logger-ui-inspector.js +++ b/src/js/logger-ui-inspector.js @@ -32,7 +32,7 @@ var showdomButton = uDom.nodeFromId('showdom'); // Don't bother if the browser is not modern enough. -if ( typeof Map === undefined || Map.polyfill || typeof WeakMap === undefined ) { +if ( typeof Map === 'undefined' || Map.polyfill || typeof WeakMap === 'undefined' ) { showdomButton.classList.add('disabled'); return; }