Skip to content

Commit

Permalink
Do not initalize typeahead with no data. Closes #339
Browse files Browse the repository at this point in the history
  • Loading branch information
iTerminate committed Jan 3, 2025
1 parent 22f8054 commit e4ec749
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions public/javascripts/traveler-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,24 +176,24 @@ $(function() {
});
devices.initialize();
}

$('#newDevice').typeahead(
{
minLength: 1,
highlight: true,
hint: true,
},
{
name: 'devices',
limit: 20,
display: 'inventoryId',
source: devices,
}
);
} else if (!devices) {
devices = [];
}

$('#newDevice').typeahead(
{
minLength: 1,
highlight: true,
hint: true,
},
{
name: 'devices',
limit: 20,
display: 'inventoryId',
source: devices,
}
);

$('#confirm').click(function(confirmE) {
confirmE.preventDefault();
if (
Expand Down

0 comments on commit e4ec749

Please sign in to comment.