Stack Trace ExplorerPro

Error stack with library frames folded away and source around the failing line.

TypeError

Cannot read properties of undefined (reading 'price')

src/lib/cart.ts:12:28

9export function formatTotal(items: Item[]) {
10 let sum = 0;
11 for (const it of items) {
12 sum += it.product.price * it.qty;
13 }
14 return sum;
15}

Edit with AIPro

Describe a change to Stack Trace Explorer and get the updated code. The live preview above stays as the original.

Quality report

Kinetiq Verified
  • Loads cleanly

    No errors on phone and desktop screens.

  • Fits a phone screen

    No sideways scrolling at 375 px wide.

  • No serious accessibility problems

    Passed the axe-core WCAG 2.1 A/AA check.

Size (gzipped)
2.0 KB
Extra packages
lucide-react
Reduced motion
No animation

Tested automatically in Chrome 157.0.8103.79 with axe-core 4.14.1. Automated tools catch only part of all accessibility problems, so treat this as a solid minimum, not a full audit.

Pro component

Get Stack Trace Explorer with Kinetiq UI Pro

Pro includes the full TypeScript source of every Pro component and template, a commercial license, and new releases every month — ₹499/month, cancel anytime.

Already Pro? Sign in and open the Code tab above to copy it.