Skip to content

Commit

Permalink
fix(xo-server-usage-report): handle missing UUIDs (#12)
Browse files Browse the repository at this point in the history
Should not happen but the plugin is no longer failing.
  • Loading branch information
julien-f committed May 18, 2017
2 parents 60c4673 + 61454e2 commit d9e2229
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/xo-server-usage-report/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ Handlebars.registerHelper('math', function (lvalue, operator, rvalue, options) {
return mathOperators[operator](+lvalue, +rvalue)
})

Handlebars.registerHelper('shortUUID', uuid => uuid.split('-')[0])
Handlebars.registerHelper('shortUUID', uuid => {
if (typeof uuid === 'string') {
return uuid.split('-')[0]
}
})

// ===================================================================

Expand Down

0 comments on commit d9e2229

Please sign in to comment.