Skip to content

Commit

Permalink
fix: suggest component library, check if it's there.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Dec 4, 2024
1 parent a59916f commit bad856f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
"helsingborg-stad/acf-export-manager": ">=1.0.0",
"symfony/polyfill-intl-idn": "1.31.0",
"helsingborg-stad/wpservice": "^2.0",
"helsingborg-stad/acfservice": "^0.8.1",
"helsingborg-stad/component-library": "^4"
"helsingborg-stad/acfservice": "^0.8.1"
},
"require-dev": {
"codedungeon/phpunit-result-printer": "^0.32.0",
Expand All @@ -72,6 +71,9 @@
"yoast/phpunit-polyfills": "^3.0",
"wp-cli/wp-cli": "^2.11"
},
"suggest": {
"helsingborg-stad/component-library": "Required for modal feature."
},
"config": {
"allow-plugins": {
"composer/installers": true,
Expand Down
2 changes: 1 addition & 1 deletion source/php/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function __construct(
$contextDetectionAsset->addHooks();

// Add modal, if enabled
if($config->getContextCheckIsModalActive()) {
if($config->getContextCheckIsModalActive() && class_exists('\ComponentLibrary\Init')) {
$modal = new \BrokenLinkDetector\Modal(
$wpService,
$config,
Expand Down

0 comments on commit bad856f

Please sign in to comment.