Skip to content

Commit

Permalink
rm getSmartblockOutput, moved to triggerSmartblock
Browse files Browse the repository at this point in the history
  • Loading branch information
mdroidian committed Sep 21, 2023
1 parent cf94252 commit b67ea9f
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ export default runExtension(async ({ extensionAPI }) => {
if (targetName) {
throw new Error(`Could not find page with name ${targetName}`);
} else {
throw new Error(
"Either the `targetName` or `targetUid` input is required"
return new Promise((resolve) =>
processBlockUid(srcUid).then(resolve)
);
}
}
Expand All @@ -341,20 +341,6 @@ export default runExtension(async ({ extensionAPI }) => {
)
);
},
getSmartblockOutput: ({
srcName,
srcUid = getCleanCustomWorkflows().find(({ name }) => name === srcName)
?.uid,
}) => {
if (!srcUid) {
if (srcName) {
throw new Error(`Could not find workflow with name ${srcName}`);
} else {
throw new Error("Either the `srcName` or `srcUid` input is required");
}
}
return new Promise((resolve) => processBlockUid(srcUid).then(resolve));
},
};

let menuLoaded = false;
Expand Down

0 comments on commit b67ea9f

Please sign in to comment.