From 1ee4d2e1fe41638eba4c338a68748eaabb8e143d Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Wed, 9 Dec 2020 14:35:20 -0500
Subject: [PATCH] Issue #3173863: better coding

---
 src/EventSubscriber/LayoutBuilderIdsRenderSubscriber.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/EventSubscriber/LayoutBuilderIdsRenderSubscriber.php b/src/EventSubscriber/LayoutBuilderIdsRenderSubscriber.php
index 58a61f0..8e3edf8 100644
--- a/src/EventSubscriber/LayoutBuilderIdsRenderSubscriber.php
+++ b/src/EventSubscriber/LayoutBuilderIdsRenderSubscriber.php
@@ -43,7 +43,7 @@ class LayoutBuilderIdsRenderSubscriber implements EventSubscriberInterface {
     $layout_builder_id = $event->getComponent()->get('layout_builder_id');
 
     // If there is a layout builder id, then set it in the attributes.
-    if ($layout_builder_id !== NULL && $layout_builder_id !== '') {
+    if ((string) $layout_builder_id) {
 
       // Set the id attribute.
       $build['#attributes']['id'] = $layout_builder_id;
-- 
GitLab