mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 18:31:37 +02:00
Etemplate: If key is empty / not set, don't try to explode it
This commit is contained in:
parent
15084c8439
commit
bac5c2e83b
@ -121,6 +121,8 @@ var et2_arrayMgr = /** @class */ (function () {
|
|||||||
* @return {string[]}
|
* @return {string[]}
|
||||||
*/
|
*/
|
||||||
et2_arrayMgr.prototype.explodeKey = function (_key) {
|
et2_arrayMgr.prototype.explodeKey = function (_key) {
|
||||||
|
if (!_key || _key.trim() === "")
|
||||||
|
return [];
|
||||||
// Parse the given key by removing the "]"-chars and splitting at "["
|
// Parse the given key by removing the "]"-chars and splitting at "["
|
||||||
var indexes = [_key];
|
var indexes = [_key];
|
||||||
if (typeof _key === "string") {
|
if (typeof _key === "string") {
|
||||||
|
@ -125,6 +125,8 @@ export class et2_arrayMgr
|
|||||||
* @return {string[]}
|
* @return {string[]}
|
||||||
*/
|
*/
|
||||||
explodeKey(_key: string): string[] {
|
explodeKey(_key: string): string[] {
|
||||||
|
if(!_key || _key.trim() === "") return [];
|
||||||
|
|
||||||
// Parse the given key by removing the "]"-chars and splitting at "["
|
// Parse the given key by removing the "]"-chars and splitting at "["
|
||||||
let indexes = [_key];
|
let indexes = [_key];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user