Skip to content
LavaFlowPreview

Project:shop

Docs (opens in a new tab)

TypeError: items.map is not a function

Diagnosis

The orders page breaks once a customer has more than one page of orders.

Root cause

The orders API returns { items, next } when it pages, and listOrders treats it as an array.

Evidence

Confidence: High

Files

  • src/orders.js

Suggested fix

Read items from the paged response.