Skip to content
Snippets Groups Projects
Commit df1cfca0 authored by Emmanuel Cortes's avatar Emmanuel Cortes Committed by Mark Miller
Browse files

Issue #3366498 by emacoti, segovia94: Undefined library throwing warning

parent 8fa562b0
No related branches found
No related tags found
No related merge requests found
pdb.ng2.core:
ng2:
remote: https://github.com/angular/angular.js
version: 2.4.0
license:
......@@ -27,5 +27,5 @@ pdb.ng2.config:
dependencies:
- core/drupal
- core/drupalSettings
- pdb_ng2/pdb.ng2.core
- pdb_ng2/ng2
- pdb_ng2/pdb.ng2.typescript
......@@ -49,20 +49,24 @@ function pdb_library_info_build() {
}
}
$pres = $info['presentation'];
$pres_library = ['pdb_' . $pres . '/' . $pres];
// Build a library to include assets in header.
if (!empty($library_header)) {
$library_header['header'] = TRUE;
// Add dependency on presentation library.
$pres = $info['presentation'];
$library_header['dependencies'] = ['pdb_' . $pres . '/' . $pres];
$library_header['dependencies'] = $library_header['dependencies'] ?? [];
$library_header['dependencies'] = array_merge($library_header['dependencies'], $pres_library);
$libraries += [$info['machine_name'] . '/header' => $library_header];
}
// Build a library to include assets in footer.
if (!empty($library_footer)) {
// Add dependency on presentation library.
$pres = $info['presentation'];
$library_footer['dependencies'] = ['pdb_' . $pres . '/' . $pres];
$library_footer['dependencies'] = $library_footer['dependencies'] ?? [];
$library_footer['dependencies'] = array_merge($library_footer['dependencies'], $pres_library);
$libraries += [$info['machine_name'] . '/footer' => $library_footer];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment