Fix error trim is not a function from commit bac5c2e83b

This commit is contained in:
Hadi Nategh 2020-11-13 13:50:53 +01:00
parent bac5c2e83b
commit 09c0d12f0e
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ 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() === "") if (!_key || typeof _key == 'string' && _key.trim() === "")
return []; 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];

View File

@ -125,7 +125,7 @@ export class et2_arrayMgr
* @return {string[]} * @return {string[]}
*/ */
explodeKey(_key: string): string[] { explodeKey(_key: string): string[] {
if(!_key || _key.trim() === "") return []; if(!_key || typeof _key == 'string' && _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];