Fix error when creating a new template as a regular user

(cherry picked from commit 4eb339d5d7)
This commit is contained in:
Daniel Molina authored and Javi Fontan committed 2013-11-27 13:22:43 +01:00
1 parent 9e219eb71e
commit 086504cc87
1 file changed
+6 -2
+6 -2
View File
@@ -265,7 +265,7 @@ function updateView(item_list,dataTable){
{
current_id = $($('td',this)[0]).html();
}
if (current_id)
{
if(jQuery.inArray(current_id, checked_row_ids)!=-1)
@@ -736,7 +736,11 @@ function makeSelectOptions(dataTable,
//Escape doublequote in a string and return it
function escapeDoubleQuotes(string){
return string.replace(/\\/g,'\\').replace(/"/g,'\\"');
if (string != undefined) {
return string.replace(/\\/g,'\\').replace(/"/g,'\\"');
} else {
return string;
}
}
function derivative(data) {