mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Fix
This commit is contained in:
parent
205f7721ea
commit
4ccf1c57d2
1 changed files with 1 additions and 0 deletions
|
@ -347,6 +347,7 @@ export function get(obj, path, def?): any {
|
|||
let cursor = obj;
|
||||
const pathParts = path.split(".");
|
||||
for (const part of pathParts) {
|
||||
if (!cursor.hasOwnProperty(part)) return def;
|
||||
cursor = cursor[part];
|
||||
if (cursor === undefined) return def;
|
||||
if (cursor == null) return null;
|
||||
|
|
Loading…
Add table
Reference in a new issue