【已解决】(new Date).format("yyyy-MM-dd") bug
发布于 6 年前 作者 yinjie 327 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

收到一个告警:

(new Date).format is not a function. (In ‘(new Date).format(“yyyy-MM-dd”)’, ‘(new Date).format’ is undefined);at api getStorage success callback function success@<https://usr/app-service.js:6610:120>>><<<FLOATING LINK: https://lib/WAService.js:1:688144>>><<<FLOATING LINK: https://lib/WAService.js:1:101845>>>g@<<<FLOATING LINK: https://lib/WAService.js:1:276224>>>We@<<<FLOATING LINK: https://lib/WAService.js:1:276399>>><<<FLOATING LINK: https://lib/WAService.js:1:277851>>>y@<<<FLOATING LINK: https://lib/WAService.js:1:1377>>><<<FLOATING LINK: https://lib/WAService.js:1:1121>>>_@<<<FLOATING LINK: https://lib/WAService.js:1:1287>>>invoke@<<<FLOATING LINK: https://lib/WAService.js:1:117378>>>J@<<<FLOATING LINK: https://lib/WAService.js:1:270304>>><<<FLOATING LINK: https://lib/WAService.js:1:277832>>>getStorage@<<<FLOATING LINK: https://lib/WAService.js:1:493764>>><<<FLOATING LINK: https://lib/WAService.js:1:495088>>><<<FLOATING LINK: https://lib/WAService.js:1:495489>>><<<FLOATING LINK: https://lib/WAService.js:1:322872>>><<<FLOATING LINK: https://lib/WAService.js:1:688330>>><<<FLOATING LINK: https://lib/WAService.js:1:688426>>><<<FLOATING LINK: https://lib/WAService.js:1:281765>>><<<FLOATING LINK: https://usr/app-service.js:6610:47>>>require@<<<FLOATING LINK: https://lib/WAService.js:1:888690>>>global code@<<<FLOATING LINK: https://usr/app-service.js:6611:17>

查了查我们的代码里没有这样的写法,这是官方的bug吧?

更新:

找到原因了,报错信息被简化了,实际上是找不到(new Date()).format方法

3 回复

没有format这个函数

这个怎么查???

回到顶部