Skip to content

Commit 5d50093

Browse files
ignore new pages but not updates
1 parent a3c822c commit 5d50093

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default {
171171
});
172172
}
173173

174-
if (!pageExistsInDB && this.includeNewPages) {
174+
if (!pageExistsInDB) {
175175
isNewPage = true;
176176
propertyHasChanged = true;
177177
propertyValues[page.id] = {
@@ -185,6 +185,11 @@ export default {
185185
}
186186
}
187187

188+
if (isNewPage && !this.includeNewPages) {
189+
console.log(`Ignoring new page: ${page.id}`);
190+
continue;
191+
}
192+
188193
if (propertyHasChanged) {
189194
this.emitEvent(page, changes, isNewPage);
190195
}

0 commit comments

Comments
 (0)