Skip to content

Commit

Permalink
fix(haltif): Fix to include contexts on other operators
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed Mar 9, 2019
1 parent 61f9768 commit 1a250b9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nodes/_static/haltif.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ window.setupHaltIf = function(

$compare.change(function(e) {
let types = defaultTypes;
let extraTypes = ['flow', 'global'];
$help.hide();

if (defaultTypes.includes('msg')) {
extraTypes = ['msg'].concat(extraTypes);
}

switch (e.target.value) {
case 'is':
case 'is_not':
Expand All @@ -48,12 +53,12 @@ window.setupHaltIf = function(
case 'lte':
case 'gt':
case 'gte':
types = ['num'];
types = ['num'].concat(extraTypes);
break;
case 'includes':
case 'does_not_include':
$help.show();
types = ['str'];
types = ['str'].concat(extraTypes);
break;
}
$input.typedInput('types', types);
Expand Down

0 comments on commit 1a250b9

Please sign in to comment.