mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-06 04:21:55 +00:00
add an early-return to getHrefContainerProps to avoid similar bugs
This commit is contained in:
@@ -99,6 +99,9 @@ globalThis.handleHrefContainerClick = (e: MouseEvent) => {
|
||||
};
|
||||
|
||||
export function getHrefContainerProps(href: string) {
|
||||
// If the href is null or empty, no props should be added
|
||||
if (!href) return {};
|
||||
|
||||
// hack to detect whether the function is in an Astro or Preact environment,
|
||||
// assuming that Preact is only used outside of a node environment
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user