mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] devtools: fix crash while highlighting env
This commit fixes a crash that could happen in the keepEnvLit method when passing through the env of the inspected component.
This commit is contained in:
committed by
Géry Debongnie
parent
9b1ec5dc0e
commit
6050827689
@@ -899,7 +899,7 @@ function keepEnvLit(details) {
|
||||
alreadyMet.add(details.env.children[i].name);
|
||||
} else {
|
||||
let lastElement = details.env.children[i];
|
||||
while (lastElement.children.at(-1).name === "[[Prototype]]") {
|
||||
while (lastElement.children.at(-1)?.name === "[[Prototype]]") {
|
||||
for (const [index, child] of lastElement.children.entries()) {
|
||||
if (index < lastElement.children.length - 1) {
|
||||
if (!alreadyMet.has(child.name)) {
|
||||
|
||||
Reference in New Issue
Block a user