diff --git a/src/services/ComponentsService.php b/src/services/ComponentsService.php index 876d60b..250a41f 100644 --- a/src/services/ComponentsService.php +++ b/src/services/ComponentsService.php @@ -236,7 +236,7 @@ public function create(string $value, array $variables = [], array|string $attri $mergedVariables = $event->variables; $attributes = $event->attributes; - // Allow ID to be overridden, otherwise ensure random ID does not start with a digit (to avoid a JS error) + // Fall back to a random ID that does not start with a digit (to avoid a JS error) $id = $attributes['id'] ?? ('component-' . StringHelper::randomString(6)); $values['sprig:id'] = Craft::$app->getSecurity()->hashData($id);