Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chipit24 committed Apr 29, 2020
1 parent 1a7c4d8 commit 571f785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rules/signal-ref-required.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { is, isAny } = require('bpmnlint-utils');

/**
* A rule that checks that call activities have a process selected
* A rule that checks that signal events have a signal ref
*/
module.exports = function() {

function hasEventDefinitions(node) {
return node.eventDefinitions instanceof Array
return Array.isArray(node.eventDefinitions)
&& node.eventDefinitions.length > 0;
}

Expand All @@ -33,7 +33,7 @@ module.exports = function() {
}

const missing = filterEventDefinitionsWithoutSignalRef(node);

if (missing.length > 0) {
reporter.report(node.id, 'Missing signal reference');
}
Expand Down

0 comments on commit 571f785

Please sign in to comment.