mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:27:01 +00:00
fix diff
This commit is contained in:
13
js/diff.js
13
js/diff.js
@@ -437,7 +437,8 @@ class Diff
|
||||
if (
|
||||
item.indexOf('tests/') === 0 ||
|
||||
item.indexOf('upgrades/') === 0 ||
|
||||
item.indexOf('frontend/') === 0
|
||||
item.indexOf('frontend/') === 0||
|
||||
item.indexOf('js/') === 0
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -573,16 +574,22 @@ class Diff
|
||||
return item.name;
|
||||
}
|
||||
|
||||
if (!item.src) {
|
||||
const src = /** @type string */item.src;
|
||||
|
||||
if (!src) {
|
||||
throw new Error("Bad lib data in `frontend/libs.json`.");
|
||||
}
|
||||
|
||||
let name = item.src.split('/')[1] || null;
|
||||
let name = src.split('/')[1];
|
||||
|
||||
if (!name) {
|
||||
throw new Error("Bad lib data in `frontend/libs.json`.");
|
||||
}
|
||||
|
||||
if (name.startsWith('@')) {
|
||||
return src.split('/').slice(1, 3).join('/');
|
||||
}
|
||||
|
||||
return name;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user