wechat-miniprogram / wxml-to-canvas

MIT License
158 stars 42 forks source link

MiniProgramError null is not an object (evaluating 'n.getContext') #22

Open Atlan8 opened 2 years ago

Atlan8 commented 2 years ago

打开代码片段,预览PC端小程序会报错,canvas 渲染失败:

MiniProgramError null is not an object (evaluating 'n.getContext') at canvas (miniprogram_npm/wxml-to-canvas/index.js:126:23) at (WAService.js:2:2241907) at at (WAService.js:2:122361) at (WAService.js:2:2242060) forEach@[native code] at n (WAService.js:2:2242039) at (WAService.js:2:2242187) at (WAService.js:2:3165496) at n (WAService.js:2:3072125) at (WAService.js:2:3072313) at (WAService.js:2:1909240) at Q (WAService.js:2:78233) global code@

操作系统:macOS Monterey 12.0.1 微信开发者工具版本:1.05.2110290