Angular奇怪的bug

115 阅读1分钟

1. ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'length')

控制台里看到这种错误很棘手,特别是在封装了各种module的lib库之后,可能每个module的lib都有自己的业务,问题点出现在:

检测拦截器的header头里一定是有key为空