autocomplete.js
autocomplete.js copied to clipboard
TypeError: mapping.Conditions is undefined
In browser (any) using dist/autocomplete.js we get error in console.log: TypeError: mapping.Conditions is undefined: autocomplete.js:112:13
Completion works though. It happens every time right before (of after) ajax callback.
If we change line 112 of js file (I know .ts should be changed, but I did this for quick experiment) to: if (mapping.Conditions) { mapping.Conditions.forEach(eventIdentifier); }
Then another error appears: TypeError: mapping.Callback is undefined: autocomplete.js:116:17
Changing this to: if (match === true && mapping.Callback) { mapping.Callback.call(params, event); }
Fixes it. I can prepare pull request with .ts but I just wanted to know if the way I fixed it is correct.