a.getContext is not a function
TypeError: a.getContext is not a function
at xf.getContext (https://lib/WAServiceMainContext.js:1:1323722)
at Function.<anonymous> (https://lib/WAServiceMainContext.js:1:1441826)
at https://lib/WAServiceMainContext.js:1:134173
at https://lib/WAServiceMainContext.js:1:1441929
at https://lib/WAServiceMainContext.js:1:1441917
一开始以为是没有获取到canvas节点,加上了res && res[0] && res[0].node && res[0].node.getContext判断,代码被执行了,但是生产总是会有告警getContext is not a function,什么情况会出现getContext不为空但不是function的情况?
就很奇怪,小程序用着没问题,平台就给报这个错