Skip to content

Commit f9eb82f

Browse files
committed
make copilot happy
1 parent ccaaab8 commit f9eb82f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/compass-components/src/components/drawer-portal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ export const DrawerAnchor: React.FunctionComponent = ({ children }) => {
301301
}
302302

303303
setAssistantNodes((oldNodes) => {
304-
for (const id of Object.keys({ ...nodes, oldNodes })) {
304+
// account for removed nodes by checking all keys of both old and new
305+
for (const id of Object.keys({ ...oldNodes, nodes })) {
305306
if (nodes[id] !== oldNodes[id]) {
306307
return nodes;
307308
}

0 commit comments

Comments
 (0)