socketsupply / tonic

A Low Profile Component Framework – Stable, minimal, easy to audit, zero-dependencies and build-tool-free.
http://tonicframework.dev
MIT License
867 stars 24 forks source link

Async functions are stringified #113

Closed nichoth closed 1 year ago

nichoth commented 1 year ago

Bug report

Link to a working example, because we pass a function that is synchronous: https://jsfiddle.net/k3prLfcd/

Passing an async function results in the function being stringified. It should be usable as a function. Link to example demonstrating the issue: https://jsfiddle.net/ope5y79f/1/

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/ope5y79f/1/
  2. Click on the button
  3. See error

Expected behavior Should be able to call async methods

Actual behavior Async functions are stringified

Screenshots

image

Desktop (please complete the following information):

bcomnes commented 1 year ago

https://github.com/socketsupply/tonic/releases/tag/v15.1.2