Skip to content

Commit fa93864

Browse files
fix: optional chaining
1 parent ba116f9 commit fa93864

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/notion/sources/updated-page/updated-page.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export default {
3535
includeNewPages: {
3636
type: "boolean",
3737
label: "Include New Pages",
38-
description: "Emit events when pages are created or updated. Set to `true` to include newly created pages. Set to `false` to only emit updated pages. Defaults to `false`.",
39-
default: false,
38+
description: "Set to `true` to emit events when pages are created. Set to `false` to ignore new pages.",
39+
default: true,
4040
},
4141
},
4242
hooks: {
@@ -138,7 +138,7 @@ export default {
138138
let propertyChangeFound = false;
139139
for (const propertyName of properties) {
140140
const hash = this.calculateHash(page.properties[propertyName]);
141-
const dbValue = propertyValues[page.id][propertyName];
141+
const dbValue = propertyValues[page.id]?.[propertyName];
142142
if (!propertyValues[page.id] || hash !== dbValue) {
143143
propertyChangeFound = true;
144144
propertyValues[page.id] = {

0 commit comments

Comments
 (0)