This repository was archived by the owner on Jun 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
This repository was archived by the owner on Jun 28, 2025. It is now read-only.
read properties of undefined #158
Copy link
Copy link
Closed
Description
jest --coverage output:
FAIL src/pages/pc/tests/app.node.spec.tsx
● Test suite failed to run
TypeError: .../player/dist/cjs/index.js: Cannot read properties of undefined (reading 'originalPositionFor')
at SourceMapTree.originalPositionFor (../../node_modules/.pnpm/@[email protected]/node_modules/@ampproject/src/source-map-tree.ts:138:19)
at trace (../../node_modules/.pnpm/@[email protected]/node_modules/@ampproject/src/source-map-tree.ts:70:25)
at EncodedSourceMapImpl.map (../../node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/src/encoded-map.ts:43:24)
at TraceMap.map (../../node_modules/.pnpm/@[email protected]/node_modules/@jridgewell/src/trace-mapping.ts:85:23)
at SourceMapTree.traceMappings (../../node_modules/.pnpm/@[email protected]/node_modules/@ampproject/src/source-map-tree.ts:42:26)
at remapping (../../node_modules/.pnpm/@[email protected]/node_modules/@ampproject/src/remapping.ts:37:30)
at mergeSourceMap (../../node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transformation/file/merge-map.js:19:30)
at generateCode (../../node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transformation/file/generate.js:72:39)
at run (../../node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transformation/index.js:55:33)
at run.next (<anonymous>)
should ensure not nil before call the source.originalPositionFor?
remapping/src/source-map-tree.ts
Lines 137 to 142 in e43d71e
| const source = this.sources[segment[1]]; | |
| return source.originalPositionFor( | |
| segment[2], | |
| segment[3], | |
| segment.length === 5 ? this.map.names[segment[4]] : name | |
| ); |
Metadata
Metadata
Assignees
Labels
No labels