updated 分支覆盖bug修复

This commit is contained in:
PASSER-BY 2023-01-29 23:50:39 +08:00
parent 2dee5ff69f
commit 707f927d95
3 changed files with 7 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -20,8 +20,8 @@ let getMap = function(prefixMap,branch){
let prefixList = prefixMap[tag][k]; let prefixList = prefixMap[tag][k];
let newKey = key.replace(tag,k); let newKey = key.replace(tag,k);
let isFilter = ['h,h','w,w','w,h','h,w'].some(pair=>(newKey.includes(pair))); let isFilter = ['h,h','w,w','w,h','h,w'].some(pair=>(newKey.includes(pair)));
let newList = [];
if(!isFilter){ if(!isFilter){
let newList = [];
prefixList.forEach(function(prefix){ prefixList.forEach(function(prefix){
nameList.forEach(function(name){ nameList.forEach(function(name){
if(name.includes('?')){ if(name.includes('?')){
@ -31,7 +31,10 @@ let getMap = function(prefixMap,branch){
} }
}); });
}); });
map[newKey] = [].concat(_map[newKey]||[],newList); if(!map[newKey]){
map[newKey] = _map[newKey]||[];
}
map[newKey] = newList.concat(map[newKey]);
} }
} }
} }