Merge pull request #135 from xsdlr/master

fix search plugin match bug
This commit is contained in:
cinwell.li 2017-03-17 16:45:49 +08:00 committed by GitHub
commit bf1ae7802d

View File

@ -73,7 +73,7 @@ export function search (keywords) {
data = data.concat(Object.keys(INDEXS[key]).map(page => INDEXS[key][page]))
})
keywords = keywords.trim().split(/[\s\-\\\/]+/)
keywords = [].concat(keywords, keywords.trim().split(/[\s\-\\\/]+/))
for (let i = 0; i < data.length; i++) {
const post = data[i]