Browse Source

Pull request #3370: KERNEL-14076 fix:解决死循环问题

Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6

* commit '3aa425ba74805ccc8cfeae6b3dd165f973a5cad1':
  KERNEL-14076 fix:解决死循环问题
es6
treecat-罗群 2 years ago
parent
commit
edb7d5b68c
  1. 5
      es6.xtype.js

5
es6.xtype.js

@ -60,12 +60,15 @@ function search(src, clzName) {
srcPath.shift();
srcPath.pop();
const findDstIndexPath = (dstArr, startIndex) => {
let i = startIndex;
while (!isExist(path.resolve("src", dstArr.slice(0, i + 1).join("/"), "index.js"))) {
while (!isExist(path.resolve("src", dstArr.slice(0, i + 1).join("/"), "index.js")) && i < dstArr.length) {
i++;
}
if (i < dstArr.length) {
return dstArr.slice(startIndex, i + 1).join("/");
} else {

Loading…
Cancel
Save