Commit 08914c53 authored by Markus Opolka's avatar Markus Opolka
Browse files

Add error handling for feature counting

- Fixed issue #1
parent 6c92953a
......@@ -31,7 +31,11 @@ function countReferences (features) {
let count = 0
for (let idx = 0; idx < features.length; idx++) {
count = count + features[idx]._attributes.ref.trim().split(' ').length
try {
count = count + features[idx]._attributes.ref.trim().split(' ').length
} catch (err) {
count = count + 1
}
}
return count
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment