Skip to content

send events #20

Open
Open
@till

Description

@till

Hi,

I am initializing plausible in my root layout, and then I assumed in a +page.svelte, I would do this:

<script>
import { pa } from '...'

const formHandler = (vals) => {
  const resp = await someRequest()
  if (resp.ok) {
    pa.login('yes')
    goto('/my-app');
    return
  }

  // handle error
}
</script>
<form>
  <!-- etc. -->
</form>

But whatever it is doing, it won't get to goto('/my-app'); anymore. Is there a restriction to running this in dev mode?

I would assume if the request to plausible fails, I would at least see that in the browser console. But there's nothing. Code execution just stops after pa.login().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions