Etemplate: If key is empty / not set, don't try to explode it

This commit is contained in:
nathangray 2020-11-12 16:29:57 -07:00
parent 15084c8439
commit bac5c2e83b
2 changed files with 4 additions and 0 deletions

View File

@ -121,6 +121,8 @@ var et2_arrayMgr = /** @class */ (function () {
* @return {string[]}
*/
et2_arrayMgr.prototype.explodeKey = function (_key) {
if (!_key || _key.trim() === "")
return [];
// Parse the given key by removing the "]"-chars and splitting at "["
var indexes = [_key];
if (typeof _key === "string") {

View File

@ -125,6 +125,8 @@ export class et2_arrayMgr
* @return {string[]}
*/
explodeKey(_key: string): string[] {
if(!_key || _key.trim() === "") return [];
// Parse the given key by removing the "]"-chars and splitting at "["
let indexes = [_key];