mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
MVC: SimpleActionButton, add catch undefined TypeError (#5848)
* Add condition for data existing before others catches Uncaught TypeError: data.status is undefined
This commit is contained in:
parent
816f20f0e5
commit
ae4e8ae4e3
@ -571,7 +571,7 @@ $.fn.SimpleActionButton = function (params) {
|
||||
if (params && params.onAction) {
|
||||
params.onAction(data, status);
|
||||
}
|
||||
if ((status != "success" || data['status'].toLowerCase().trim() != 'ok') && data['status']) {
|
||||
if ((status != "success" || ('status' in data && data['status'].toLowerCase().trim() != 'ok')) && data['status']) {
|
||||
BootstrapDialog.show({
|
||||
type: BootstrapDialog.TYPE_WARNING,
|
||||
title: this_button.data('error-title'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user