{"record":{"id":"80dfd89a5ec2571d","repo":"DioxusLabs/dioxus","slug":"dynamic-anchor-has-nodes","errorCode":null,"errorMessage":"dynamic anchor has nodes","messagePattern":"dynamic anchor has nodes","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/diff/node.rs","lineNumber":901,"sourceCode":"            .map(|slot| self.create_dynamic_node(mount, slot.index(), state))\n            .sum()\n    }\n\n    fn load_dynamic_anchor(\n        &self,\n        mount: MountId,\n        anchor: DynamicAnchor<'_>,\n        state: &mut DiffState<'_, '_, '_, '_>,\n    ) {\n        let context = state.context();\n        let Some(to) = state.to.as_deref_mut() else {\n            for slot in anchor.nodes() {\n                self.create_dynamic_node(mount, slot.index(), state);\n            }\n            return;\n        };\n\n        let first_slot = anchor.nodes().next().expect(\"dynamic anchor has nodes\");\n        let site = insertion_site_for_slot(mount, first_slot, state.dom, context);\n        let runtime = state.dom.runtime.clone();\n        let dom = &mut *state.dom;\n\n        site.create_and_place_with_result(to, runtime, |to| {\n            let mut state = DiffState::new_with_context(dom, Some(to), context);\n            let nodes = self.create_dynamic_anchor_nodes(mount, anchor, &mut state);\n            (nodes, nodes)\n        });\n    }\n\n    fn write_attr_anchor(\n        &self,\n        mount: MountId,\n        anchor: DynamicAnchor<'_>,\n        dom: &mut VirtualDom,\n        to: &mut dyn WriteMutations,\n    ) {","sourceCodeStart":883,"sourceCodeEnd":919,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core/src/diff/node.rs#L883-L919","documentation":"`load_dynamic_anchor` takes the first slot of a dynamic anchor's nodes and `expect`s at least one node to exist. This panic fires if a dynamic anchor somehow has zero nodes — an internal template invariant violation indicating a bug in template generation or diffing.","triggerScenarios":"Thrown at packages/core/src/diff/node.rs:901 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant about dynamic anchors. Report it with a minimal reproduction to the Dioxus issue tracker."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}