Fix check
This commit is contained in:
parent
08d9c740f1
commit
02cf4e020d
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ const levelMapping = [
|
||||||
const styles = Object.create(null);
|
const styles = Object.create(null);
|
||||||
|
|
||||||
const applyOptions = (object, options = {}) => {
|
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');
|
throw new Error('The `level` option should be an integer from 0 to 3');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue