Skip to content

Commit

Permalink
When sending events, check that the payload is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Dec 19, 2023
1 parent cc1db27 commit 1d375e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Message/EventHandler/ClientSideEventHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __invoke(Event $event): void
}

$this->tagBag->add(InlineScriptTag::create(
sprintf('plausible("%s", %s);', $event->getName(), $json),
'{}' === $json ? sprintf('plausible("%s");', $event->getName()) : sprintf('plausible("%s", %s);', $event->getName(), $json),
));
}

Expand Down

0 comments on commit 1d375e8

Please sign in to comment.