···242242}
243243244244export function withTrailingSlash(path: string): string {
245245- if (path[path.length - 1] !== '/') {
245245+ if (path.at(-1) !== '/') {
246246 return `${path}/`
247247 }
248248
+1-1
packages/browser/src/node/serverOrchestrator.ts
···1313 // it's possible to open the page without a context
1414 if (!sessionId) {
1515 const contexts = [...globalServer.children].flatMap(p => [...p.state.orchestrators.keys()])
1616- sessionId = contexts[contexts.length - 1] ?? 'none'
1616+ sessionId = contexts.at(-1) ?? 'none'
1717 }
18181919 // it's ok to not have a session here, especially in the preview provider