mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
fixes
This commit is contained in:
@@ -152,11 +152,13 @@ module.exports = grunt => {
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
mangle: true,
|
||||
sourceMap: true,
|
||||
output: {
|
||||
comments: /^!/,
|
||||
},
|
||||
beautify: false,
|
||||
mangle: true,
|
||||
compress: true
|
||||
},
|
||||
bundle: {
|
||||
options: {
|
||||
|
||||
@@ -348,10 +348,6 @@ class ClientManager
|
||||
*/
|
||||
private function getTranspiledModuleList(): array
|
||||
{
|
||||
if (!$this->isDeveloperMode()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$modules = array_values(array_filter(
|
||||
$this->module->getList(),
|
||||
fn ($item) => $this->module->get([$item, 'jsTranspiled'])
|
||||
@@ -368,10 +364,6 @@ class ClientManager
|
||||
*/
|
||||
private function getBundledModuleList(): array
|
||||
{
|
||||
if (!$this->isDeveloperMode()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$modules = array_values(array_filter(
|
||||
$this->module->getList(),
|
||||
fn ($item) => $this->module->get([$item, 'bundled'])
|
||||
|
||||
@@ -520,6 +520,23 @@
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {string} id
|
||||
* @return {string}
|
||||
*/
|
||||
_restoreId(id) {
|
||||
if (!id.includes(':')) {
|
||||
return id;
|
||||
}
|
||||
|
||||
let [mod, part] = id.split(':');
|
||||
|
||||
return `modules/${mod}/${part}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {string} id
|
||||
* @return {string}
|
||||
*/
|
||||
_normalizeId(id) {
|
||||
if (id in this._aliasMap) {
|
||||
@@ -680,14 +697,16 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (id in this._bundleMapping) {
|
||||
let bundleName = this._bundleMapping[id];
|
||||
let restoredId = this._restoreId(id);
|
||||
|
||||
if (restoredId in this._bundleMapping) {
|
||||
let bundleName = this._bundleMapping[restoredId];
|
||||
|
||||
this._requireBundle(bundleName).then(() => {
|
||||
let value = this._get(id);
|
||||
|
||||
if (typeof value === 'undefined') {
|
||||
let msg = `Could not obtain module '${id}' from bundle '${bundleName}'.`;
|
||||
let msg = `Could not obtain module '${restoredId}' from bundle '${bundleName}'.`;
|
||||
console.error(msg);
|
||||
|
||||
throw new Error(msg);
|
||||
|
||||
Reference in New Issue
Block a user