Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-10-06 08:50:26 +02:00 committed by GitHub
parent 9cdbb2c6ab
commit be35b97652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -290,8 +290,8 @@ module.exports = (_ => {
if (!nodeOrObj || !valuePath) return null;
let obj = Node.prototype.isPrototypeOf(nodeOrObj) ? BDFDB.ReactUtils.getInstance(nodeOrObj) : nodeOrObj;
if (!BDFDB.ObjectUtils.is(obj)) return null;
let found = obj, values = valuePath.split(".").filter(n => n);
for (value of values) {
let found = obj;
for (const value of valuePath.split(".").filter(n => n)) {
if (!found) return null;
found = found[value];
}