Skip to content

Commit

Permalink
fix at 1073, check if dataItem is not undefined if no data was found …
Browse files Browse the repository at this point in the history
…in the autocomplete input.
  • Loading branch information
beppo-ivel committed Oct 10, 2020
1 parent 4d24e3b commit 2d58858
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions custom_ROToolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,11 +1069,12 @@ function createAutoComplete(tag, tagElement) {
(document.getElementById("ac"+targetId)).style.textDecoration = "underline"
this.value(this.dataSource._view[0].DisplayName);
}

if (_.isUndefined(dataItem.BaseId)) {
dataItem.BaseId = !_.isUndefined(dataItem.Id) ? dataItem.Id : null;
}

if(!_.isUndefined(dataItem)){
if (_.isUndefined(dataItem.BaseId)) {
dataItem.BaseId = !_.isUndefined(dataItem.Id) ? dataItem.Id : null;
}
}

newData.pop();
newData.push(dataItem);
}
Expand Down

0 comments on commit 2d58858

Please sign in to comment.