[{"data":1,"prerenderedAt":153},["ShallowReactive",2],{"content-\u002Fe\u002Faf08":3},{"id":4,"title":5,"body":6,"condition":144,"description":145,"extension":146,"meta":147,"navigation":148,"path":149,"seo":150,"stem":151,"__hash__":152},"errors\u002Fe\u002Faf08.md","AF08",{"type":7,"value":8,"toc":139},"minimark",[9,13,20,23,29,32,37,53,57,60,117,127,135],[10,11,5],"h1",{"id":12},"af08",[14,15,16],"p",{},[17,18,19],"strong",{},"A path contained a numeric segment that is not a non-negative integer.",[14,21,22],{},"In development this reads:",[24,25,26],"blockquote",{},[14,27,28],{},"Path segments must be non-negative integers when numeric; got -1",[14,30,31],{},"The production message appends the offending value after the code.",[33,34,36],"h2",{"id":35},"what-happened","What happened",[14,38,39,40,44,45,48,49,52],{},"Numeric segments address array positions, so ",[41,42,43],"code",{},"-1",", ",[41,46,47],{},"1.5",", and ",[41,50,51],{},"NaN"," have no target. The path canonicalizer rejects them at the boundary, before any read or write runs against the form tree.",[33,54,56],{"id":55},"how-to-fix-it","How to fix it",[14,58,59],{},"Pass a real index. Computed positions are the usual source; clamp or guard the arithmetic that produced the value before it enters the path:",[61,62,67],"pre",{"className":63,"code":64,"language":65,"meta":66,"style":66},"language-ts shiki shiki-themes github-light github-dark","form.setValue(['items', items.length - 1, 'name'], 'last')\n","ts","",[41,68,69],{"__ignoreMap":66},[70,71,74,78,82,85,89,92,96,100,103,105,108,111,114],"span",{"class":72,"line":73},"line",1,[70,75,77],{"class":76},"sVt8B","form.",[70,79,81],{"class":80},"sScJk","setValue",[70,83,84],{"class":76},"([",[70,86,88],{"class":87},"sZZnC","'items'",[70,90,91],{"class":76},", items.",[70,93,95],{"class":94},"sj4cs","length",[70,97,99],{"class":98},"szBVR"," -",[70,101,102],{"class":94}," 1",[70,104,44],{"class":76},[70,106,107],{"class":87},"'name'",[70,109,110],{"class":76},"], ",[70,112,113],{"class":87},"'last'",[70,115,116],{"class":76},")\n",[14,118,119,120,123,124,126],{},"guards ",[41,121,122],{},"items.length > 0",", or the computed index is ",[41,125,43],{},".",[14,128,129,134],{},[130,131,133],"a",{"href":132},"\u002Fdocs\u002Fwriting-and-mutating\u002Fset-value","setValue patterns"," covers both path forms, dotted and segment-tuple, and when to reach for each.",[136,137,138],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":66,"searchDepth":140,"depth":140,"links":141},2,[142,143],{"id":35,"depth":140,"text":36},{"id":55,"depth":140,"text":56},"A numeric path segment is not a non-negative integer","A numeric path segment was negative or fractional. Array positions in Attaform paths are non-negative integers; the production message appends the value.","md",{},true,"\u002Fe\u002Faf08",{"title":5,"description":145},"e\u002Faf08","fjoXUxYB4Gqp-Qlg8RQRfyD7hJyUrTMRL5ZLu8tx3Hw",1787641563078]