TypeError:无法读取属性' join'为null

时间:2016-09-04 12:38:07

标签: node.js express server

我正在为一所高中托管一个时间表网站但是每当有人搜索他的时间表时,节点服务器会关闭并提供此错误

'value' : element.match(/.*rooster|t\/m|\d\d\s\w{3}/gi).join(' ').slice(1).toLowerCase(),
                                                               ^

TypeError: Cannot read property 'join' of null
    at scheduleNames (/home/rooster/production/schedule.js:63:64)
    at toJSON (/home/rooster/production/schedule.js:78:15)
    at IncomingMessage.res.on (/home/rooster/production/schedule.js:46:34)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:934:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

这段代码有错,但我不知道它是什么:

'value' : element.match(/.*rooster|t\/m|\d\d\s\w{3}/gi).join(' ').slice(1).toLowerCase(),

0 个答案:

没有答案
相关问题