updated 对“我”的优化

This commit is contained in:
郑浩乐 2016-03-22 15:53:25 +08:00
parent 2aaa6ed776
commit 3de23a5a37

View File

@ -454,8 +454,10 @@
var has = false; var has = false;
for(var i in _data){ for(var i in _data){
var value = _data[i]; var value = _data[i];
if(i&value.indexOf(name)>-1){ //是否存在该关系 if(value.indexOf(name)>-1){ //是否存在该关系
if(i){
arr.push(i); arr.push(i);
}
has = true; has = true;
} }
} }
@ -581,7 +583,7 @@
window.relationship = relationship; window.relationship = relationship;
})(window); })(window);
// console.log(relationship('老婆的外孙的姥姥')); // console.log(relationship('我的大爷'));
//弟弟的爸爸的女儿 //弟弟的爸爸的女儿
//老婆的爸爸的女儿 //老婆的爸爸的女儿
//表哥的表哥 //表哥的表哥