Skip to content

Commit fb75324

Browse files
authored
Pass default properties from command block to nextBlocks (Closes #109) (#110)
* Refactor proccessBlockWithSmartness function to include default values for block properties * rm children * 1.7.1
1 parent c66e5be commit fb75324

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smartblocks",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"description": "Create custom and programmable templates from within Roam!",
55
"main": "./build/main.js",
66
"scripts": {

src/utils/core.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -2434,7 +2434,13 @@ export const proccessBlockWithSmartness = async (
24342434
...props,
24352435
children,
24362436
},
2437-
...nextBlocks,
2437+
...nextBlocks.map((block) => ({
2438+
textAlign,
2439+
viewType,
2440+
heading,
2441+
open,
2442+
...block,
2443+
})),
24382444
];
24392445
} catch (e) {
24402446
const error = e as Error;

0 commit comments

Comments
 (0)