We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
@params
1 parent 95cb64b commit b52439fCopy full SHA for b52439f
javascripts/discourse/components/right-sidebar-blocks.gjs
@@ -25,13 +25,18 @@ export default class RightSidebarBlocks extends Component {
25
26
if (block.component) {
27
block.classNames = `rs-component rs-${block.name}`;
28
- block.parsedParams = {};
+
29
+ const parsedParams = {};
30
if (block.params) {
31
block.params.forEach((p) => {
- block.parsedParams[p.name] = p.value;
32
+ parsedParams[p.name] = p.value;
33
});
34
}
35
36
+ // `params` key is for backwards compatibility.
37
+ // New components can use the top level curried arguments
38
+ block.parsedParams = { params: parsedParams, ...parsedParams };
39
40
blocksArray.push(block);
41
} else {
42
// eslint-disable-next-line no-console
0 commit comments