Skip to content

Commit

Permalink
fix no metadata fn specified
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed May 25, 2024
1 parent 1ebcc60 commit 343ffcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "sst",
"type": "module",
"sideEffects": false,
"version": "3.0.21",
"version": "3.0.22",
"main": "./dist/index.js",
"exports": {
".": "./dist/index.js",
Expand Down
7 changes: 4 additions & 3 deletions sdk/js/src/event/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ export module event {
) => Promise<Payload>;
const validate = validator(schema);
async function create(properties: any, metadata?: any) {
metadata =
typeof input.metadata === "function"
metadata = input.metadata
? typeof input.metadata === "function"
? input.metadata(type, properties)
: input.metadata(metadata);
: input.metadata(metadata)
: {};
properties = validate(properties);
return {
type,
Expand Down

0 comments on commit 343ffcc

Please sign in to comment.