Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions javascripts/discourse/components/right-sidebar-blocks.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ export default class RightSidebarBlocks extends Component {

if (block.component) {
block.classNames = `rs-component rs-${block.name}`;
block.parsedParams = {};

const parsedParams = {};
if (block.params) {
block.params.forEach((p) => {
block.parsedParams[p.name] = p.value;
parsedParams[p.name] = p.value;
});
}

// `params` key is for backwards compatibility.
// New components can use the top level curried arguments
block.parsedParams = { params: parsedParams, ...parsedParams };

blocksArray.push(block);
} else {
// eslint-disable-next-line no-console
Expand Down