From bac5c2e83ba34e74433f8a93513c00e3c53d0bd0 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 12 Nov 2020 16:29:57 -0700 Subject: [PATCH] Etemplate: If key is empty / not set, don't try to explode it --- api/js/etemplate/et2_core_arrayMgr.js | 2 ++ api/js/etemplate/et2_core_arrayMgr.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/api/js/etemplate/et2_core_arrayMgr.js b/api/js/etemplate/et2_core_arrayMgr.js index 8661fa316d..818a9c4567 100644 --- a/api/js/etemplate/et2_core_arrayMgr.js +++ b/api/js/etemplate/et2_core_arrayMgr.js @@ -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") { diff --git a/api/js/etemplate/et2_core_arrayMgr.ts b/api/js/etemplate/et2_core_arrayMgr.ts index 38a191db97..17adc7e204 100644 --- a/api/js/etemplate/et2_core_arrayMgr.ts +++ b/api/js/etemplate/et2_core_arrayMgr.ts @@ -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];