[Chore] Context menu debugging (4)

pull/67/head
CanadaHonk 2 years ago
parent c1f476dd00
commit 2de6582152

@ -96,11 +96,12 @@ export const patch = (type, itemProps) => {
return args;
}
const alreadyHasItem = findInReactTree(children, child => child && child.props && child.props.id === (itemProps.id || labelToId(itemProps.label)));
console.log('DEBUG 1', itemProps);
const alreadyHasItem = findInReactTree(children, child => child?.props?.id === (itemProps.id || labelToId(itemProps.label)));
if (alreadyHasItem) return args;
const clonedProps = Object.assign({}, itemProps);
console.log('DEBUG', clonedProps);
console.log('DEBUG 2', clonedProps);
const item = generateElement(clonedProps, clonedProps.sub, wantedNavId, type, Object.assign({}, getExtraInfo(navId)), { Menu, React });

Loading…
Cancel
Save