Problem/Motivation
When token value is empty, settingsSummary() returns an non-empty array.
Proposed resolution
diff --git a/src/Plugin/UiPatterns/Source/TokenSource.php b/src/Plugin/UiPatterns/Source/TokenSource.php
index 0275bc96..baaf3d4a 100644
--- a/src/Plugin/UiPatterns/Source/TokenSource.php
+++ b/src/Plugin/UiPatterns/Source/TokenSource.php
@@ -146,6 +146,9 @@ class TokenSource extends SourcePluginBase {
* {@inheritdoc}
*/
public function settingsSummary(): array {
+ if (empty($this->getSetting('value'))) {
+ return [];
+ }
return [
$this->getSetting('value'),
];
Issue fork ui_patterns-3528093
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
pdureau commentedComment #5
pdureau commented