Added extra protection in case onadd update has ui == undefined

Fix for script errors while using GridFieldOrderableRows with module https://github.com/micschk/silverstripe-groupable-gridfield
This commit is contained in:
Milan Jelicanin 2016-08-20 04:35:52 +02:00
parent a4d15e4ca4
commit 0d13112e44
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@
var update = function(event, ui) {
// If the item being dragged is unsaved, don't do anything
var postback = true;
if (ui.item.hasClass('ss-gridfield-inline-new')) {
if ((ui != undefined) && ui.item.hasClass('ss-gridfield-inline-new')) {
postback = false;
}