diff --git a/src/LiveComponent/assets/src/ComponentRegistry.ts b/src/LiveComponent/assets/src/ComponentRegistry.ts index d128af1ef81..3332d82359f 100644 --- a/src/LiveComponent/assets/src/ComponentRegistry.ts +++ b/src/LiveComponent/assets/src/ComponentRegistry.ts @@ -10,7 +10,7 @@ let componentMapByComponent = new Map(); export const resetRegistry = function () { componentMapByElement = new WeakMap(); componentMapByComponent = new Map(); -} +}; export const registerComponent = function (component: Component) { componentMapByElement.set(component.element, component); diff --git a/src/LiveComponent/src/Util/LiveControllerAttributesCreator.php b/src/LiveComponent/src/Util/LiveControllerAttributesCreator.php index 4cf29bc2031..25d89e94b6d 100644 --- a/src/LiveComponent/src/Util/LiveControllerAttributesCreator.php +++ b/src/LiveComponent/src/Util/LiveControllerAttributesCreator.php @@ -101,7 +101,7 @@ public function attributesForRendering(MountedComponent $mounted, ComponentMetad $liveMetadata = $this->metadataFactory->getMetadata($mounted->getName()); $requestMethod = $liveMetadata->getComponentMetadata()?->get('method') ?? 'post'; // set attribute if needed - if ($requestMethod !== 'post') { + if ('post' !== $requestMethod) { $attributesCollection->setRequestMethod($requestMethod); }