Skip to content

TypeError: mapping.Conditions is undefined #73

@kgkg

Description

@kgkg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions