Value assigned to locals is not accepted.
Это содержимое пока не доступно на вашем языке.
LocalsNotAnObject:
localscan only be assigned to an object. Other values like numbers, strings, etc. are not accepted.
What went wrong?
Section titled What went wrong?Thrown in development mode when locals is overwritten with something that is not an object
For example:
import {defineMiddleware} from "astro:middleware";export const onRequest = defineMiddleware((context, next) => { context.locals = 1541; return next();});