Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
fix e[o].trim is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
maykar committed Sep 25, 2020
1 parent d5ccdd4 commit f2cb278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const processTabArray = array => {
const sortNumber = (a, b) => a - b;
array = typeof array === 'string' ? array.split(',') : array;
for (const i in array) {
array[i] = array[i].trim();
if (typeof array[i] == 'string') array[i] = array[i].trim();
if (typeof array[i] == 'string' && array[i].includes('to')) {
const rangeTest = array[i].replace(/ /g, '').split('to');
if (!(rangeTest[0].match(/[a-z]/g) || rangeTest[1].match(/[a-z]/g))) ranges.push(buildRange(array[i]));
Expand Down

0 comments on commit f2cb278

Please sign in to comment.