Skip to content

Commit

Permalink
Include _components in context
Browse files Browse the repository at this point in the history
  • Loading branch information
pattra committed Sep 12, 2024
1 parent 768e663 commit 2882ae2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/spectral/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prismatic-io/spectral",
"version": "9.1.3",
"version": "9.1.4",
"description": "Utility library for building Prismatic components",
"keywords": ["prismatic"],
"main": "dist/index.js",
Expand Down
9 changes: 3 additions & 6 deletions packages/spectral/src/serverTypes/convertIntegration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,8 @@ const convertOnExecution =
componentRegistry: ComponentRegistry,
): ServerActionPerformFunction =>
(context, params) => {
const {
// @ts-expect-error _components isn't part of the public API
_components,
...remainingContext
} = context;
// @ts-expect-error _components isn't part of the public API
const { _components } = context;

const invoke = (_components as { invoke: ComponentActionInvokeFunction }).invoke;

Expand Down Expand Up @@ -760,7 +757,7 @@ const convertOnExecution =
{},
);

return onExecution({ ...remainingContext, components: componentMethods }, params);
return onExecution({ ...context, components: componentMethods }, params);
};

/** Creates the structure necessary to import a Component as part of a
Expand Down

0 comments on commit 2882ae2

Please sign in to comment.