Cannot read property 'defaultView' of undefined;at SelectorQuery callback function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 121
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Cannot read property 'defaultView' of undefined;at SelectorQuery callback function
TypeError: Cannot read property 'defaultView' of undefined
at Object.getStyle (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:1981:65)
at Object.getWidth (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:1983:26)
at t.e._initCanvas (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:2513:54)
at new t (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:2498:100)
at e.i._initCanvas (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:580:23)
at e.i._init (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:587:18)
at new e (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/wx-f2/index.js:465:19)
at Object.initChart [as onInit] (http://127.0.0.1:16022/appservice/pages/column/column.js:14:11)
at n. (http://127.0.0.1:16022/appservice/miniprogram_npm/@antv/f2-canvas/index.js:181:43)
at Function. (http://127.0.0.1:16022/appservice/__dev__/WAService.js:1:481498)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the SelectorQuery callback failure on the column page and inspect the stack locations in miniprogram_npm/@antv/wx-f2/index.js, especially getStyle, getWidth, and _initCanvas. Trace the initialization from pages/column/column.js:14 and verify that the callback completes without the defaultView error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100