This repository was archived by the owner on Mar 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Support serializing Async functions #28
Copy link
Copy link
Open
Description
Tried to serialized an async function, and get this error:
UnhandledPromiseRejectionWarning: TypeError: Function.prototype.toString requires that 'this' be a Function
at AsyncFunction.toString (<anonymous>)
at String (<anonymous>)
at isNativeFunction (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:386:16)
at getExpression (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:155:13)
at getExpression (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:294:27)
at getExpression (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:269:25)
at getExpression (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:190:25)
at getExpression (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:269:25)
at lave (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/node_modules/lave/index.js:13:20)
at main (/Users/nbalazs/Work/projects/stylers/Meta/MetaBase.CLI/MigrateMetadata/break_metadata.js:117:24)
Example function:
const fn = async (args) => {
console.log(args.entities);
for (const entity of args.entities) {
if (entity.Name) {
entity.Name = 'SS_' + entity.Name;
}
}
return await commit();
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels