Skip to content

Fix for error that occurs when the editable doesn't have a "data-editable" attri…

Robert Sinton requested to merge hotfix/editable_data_fix into versions/0.16.3

Fix for error that occurs when the editable doesn't have a "data-editable" attribute, e.g. for editables that are initialised manually.

Without this, those editables throw an error when initialised: "Uncaught TypeError: Cannot read property 'endpoint (or whatever)' of undefined".

This is because the editable_data variable stays undefined, and the error is triggered on lines like this:

custom_settings = { api_url : $this.data('endpoint') || editable_data.endpoint,

Merge request reports