From 02cf4e020d5cf8e4604ff9a8ee10740f56b0eb8f Mon Sep 17 00:00:00 2001 From: Richie Bendall Date: Tue, 31 Mar 2020 22:42:06 +1300 Subject: [PATCH] Fix check --- source/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.js b/source/index.js index 7d05388..53bce86 100644 --- a/source/index.js +++ b/source/index.js @@ -17,7 +17,7 @@ const levelMapping = [ const styles = Object.create(null); const applyOptions = (object, options = {}) => { - if (Number.isInteger(options.level) && (options.level > 3 || options.level < 0)) { + if (!Number.isInteger(options.level) || options.level > 3 || options.level < 0) { throw new Error('The `level` option should be an integer from 0 to 3'); }