Skip to content

Commit e58bb43

Browse files
Avoid complaints about formularyMap when load fails
1 parent 2f9af76 commit e58bb43

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ehr/resources/web/ehr/DataEntryUtils.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,12 @@ EHR.DataEntryUtils = new function(){
734734
autoLoad: true,
735735
listeners: {
736736
delay: 100,
737-
load: function(store){
738-
store.getFormularyMap();
737+
load: function(store, records, successful) {
738+
// Avoid logging complaints about an empty formulary when the browser navigates away mid-load
739+
// The store gives the user feedback already for 500 or similar errors from the server
740+
if (successful) {
741+
store.getFormularyMap();
742+
}
739743
}
740744
},
741745
getFormularyRecords: function(code){

0 commit comments

Comments
 (0)