sproto-js
sproto-js copied to clipboard
header_tmp : Uncaught TypeError: Cannot set property 'type' of null
经常会遇到下面这样的错误 Uncaught TypeError: Cannot set property 'type' of null Uncaught TypeError: Cannot read property 'type' of null
看了下代码,好像是 header_tmp 为空了。 这个似乎是共用的,如果某些时候sp.decode返回了一个空,这时header_tmp就没了,就会导致后面一直出错。
可以简单粗暴的去掉header_tmp吗,每次用时都创建一个新的 {}