sproto-js icon indicating copy to clipboard operation
sproto-js copied to clipboard

header_tmp : Uncaught TypeError: Cannot set property 'type' of null

Open mysteryzzp opened this issue 7 years ago • 0 comments

经常会遇到下面这样的错误 Uncaught TypeError: Cannot set property 'type' of null Uncaught TypeError: Cannot read property 'type' of null

看了下代码,好像是 header_tmp 为空了。 这个似乎是共用的,如果某些时候sp.decode返回了一个空,这时header_tmp就没了,就会导致后面一直出错。

可以简单粗暴的去掉header_tmp吗,每次用时都创建一个新的 {}

mysteryzzp avatar Dec 27 '18 10:12 mysteryzzp