首页 > 技术文章 > TypeError: *.getMonth is not a function 解决办法

jiaxiaonuo 2019-03-19 10:40 原文

在使用之前进行判断就吧问题解决了
if (Object.prototype.toString.call(time) === '[object Date]') {
  time.getMonth()........
}

推荐阅读