fix(Notion Node): Ensure arg is string during page ID extraction (#8153)

https://n8nio.sentry.io/issues/4765178087

Co-authored-by: Michael Kret <michael.k@radency.com>
This commit is contained in:
Iván Ovejero 2024-01-02 10:21:32 +01:00 committed by GitHub
parent 8e873ca2f3
commit e94b8a6c30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -892,7 +892,7 @@ export async function downloadFiles(this: IExecuteFunctions | IPollFunctions, re
return elements; return elements;
} }
export function extractPageId(page: string) { export function extractPageId(page = '') {
if (page.includes('p=')) { if (page.includes('p=')) {
return page.split('p=')[1]; return page.split('p=')[1];
} else if (page.includes('-') && page.includes('https')) { } else if (page.includes('-') && page.includes('https')) {