@[TOC](前端读取response.headers异常:Cannot read properties of undefined (reading ‘split’) )
-
前端读取response.headers异常
-
Cannot read properties of undefined (reading ‘split’)
-
TypeError: Cannot read properties of undefined (reading ‘split’)
-
报错解释:
这个错误表明尝试读取一个未定义(undefined)的变量的属性
split。在JavaScript中,只有对象才能拥有属性和方法,而当尝试在undefined上调用split方法时,会抛出TypeError错误,因为undefined没有split方法。**** -
res.headers[“content-disposition”]:注意content-disposition首字母小写,与后端不一致。
-
-
欢迎关注:有点建树,做更多交流。

