notion-api-js
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -22,3 +22,3 @@ "use strict"; | ||
(options.colors[color.split('_')[0]] || color); | ||
const content = properties && properties.title; | ||
const content = properties && properties.title && properties.title[0][0]; | ||
const tags = (content && content[0] ? content[0][0] : '').match(/\[.{1,}\]: .{1,}/); | ||
@@ -41,3 +41,3 @@ const attrib = tags && tags[0].replace(/(\[|\])/g, '').split(':'); | ||
if (index === 0) { | ||
return `<h1${style}>${content}</h1>`; | ||
return `<h1 ${style}>${content}</h1>`; | ||
} | ||
@@ -69,3 +69,3 @@ return null; | ||
let html = formatToHtml(element, options, index); | ||
if (typeof html === 'object') { | ||
if (html && typeof html === 'object') { | ||
const keys = Object.keys(html); | ||
@@ -93,3 +93,3 @@ keys.forEach(key => { | ||
const { format, properties } = ObjectList[0]; | ||
const title = properties.title[0][0]; | ||
const title = (properties && properties.title[0][0]) || ''; | ||
const cover = format && format.page_cover | ||
@@ -96,0 +96,0 @@ ? format.page_cover.includes('http') |
{ | ||
"name": "notion-api-js", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/Frexeptabel/notion-api/", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16254