fix(render): find => filter

This commit is contained in:
qingwei.li 2017-05-22 20:54:50 +08:00
commit eca3368152
No known key found for this signature in database
GPG key ID: B6DDC2F7AE80B2F4
2 changed files with 3 additions and 3 deletions

View file

@ -70,7 +70,7 @@ function renderNameLink (vm) {
if (isPrimitive(vm.config.nameLink)) {
el.setAttribute('href', nameLink)
} else if (typeof nameLink === 'object') {
const match = Object.keys(nameLink).find(key => path.indexOf(key) > -1)
const match = Object.keys(nameLink).filter(key => path.indexOf(key) > -1)[0]
el.setAttribute('href', nameLink[match])
}