Skip to content

Commit

Permalink
Fix val.includes is not a function
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Aug 9, 2021
1 parent e866160 commit 1ea782a
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 @@ -64,7 +64,7 @@ export function getIndividualValues(values) {
}
for (let i = 0; i < values.length; i++) {
const val = values[i].value;
if (val && val.includes('-')) {
if (val && val.includes?.('-')) {
let split_values = val.split('-');
let year = parseInt(split_values[0]);
let end_year = parseInt(split_values[1]);
Expand Down

0 comments on commit 1ea782a

Please sign in to comment.