From 87ad586a01d76585eba492d27f235a66650acb2b Mon Sep 17 00:00:00 2001 From: nulltoken Date: Thu, 22 Mar 2018 17:46:44 +0100 Subject: [PATCH] Make IE11 consumers life (a little bit) easier Similarly to #870, provides a pure IE11 compliant includes-like for users that don't polyfill. --- src/logger.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logger.js b/src/logger.js index 1ee60cdaa..d8349f54c 100644 --- a/src/logger.js +++ b/src/logger.js @@ -3,22 +3,22 @@ import configuration from './configuration' const logger = { debug(...args) { - if (['debug'].includes(configuration.logLevel)) { + if (['debug'].indexOf(configuration.logLevel) !== -1) { console.debug(...args) } }, log(...args) { - if (['debug', 'log'].includes(configuration.logLevel)) { + if (['debug', 'log'].indexOf(configuration.logLevel) !== -1) { console.log(...args) } }, warn(...args) { - if (['debug', 'log', 'warn'].includes(configuration.logLevel)) { + if (['debug', 'log', 'warn'].indexOf(configuration.logLevel) !== -1) { console.warn(...args) } }, error(...args) { - if (['debug', 'log', 'warn', 'error'].includes(configuration.logLevel)) { + if (['debug', 'log', 'warn', 'error'].indexOf(configuration.logLevel) !== -1) { console.error(...args) } },