mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Variable checks in CMSMain->jsDeclaration()
This commit is contained in:
parent
20085c46c3
commit
441d4452e3
@ -318,7 +318,7 @@ JS;
|
||||
return " {\n " . implode(", \n", $parts) . " }\n";
|
||||
} else {
|
||||
foreach($array as $part) $parts[] = $this->jsDeclaration($part);
|
||||
return " [ " . implode(", ", $parts) . " ]\n";
|
||||
return $parts ? " [ " . implode(", ", $parts) . " ]\n" : "[]\n";
|
||||
}
|
||||
} else {
|
||||
return "'" . addslashes($array) . "'";
|
||||
|
Loading…
Reference in New Issue
Block a user