New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

notion-utils

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-utils - npm Package Compare versions

Comparing version 4.2.0 to 4.2.6

6

build/cjs/get-page-property.js

@@ -12,5 +12,9 @@ "use strict";

var _a;
if (!block.properties) {
// TODO: check parent page?
return null;
}
var collection = (_a = recordMap.collection[block.parent_id]) === null || _a === void 0 ? void 0 : _a.value;
if (collection) {
var propertyId = Object.keys(collection.schema).find(function (key) { return collection.schema[key].name === propertyName; });
var propertyId = Object.keys(collection.schema).find(function (key) { var _a; return ((_a = collection.schema[key]) === null || _a === void 0 ? void 0 : _a.name) === propertyName; });
if (propertyId) {

@@ -17,0 +21,0 @@ return get_text_content_1.getTextContent(block.properties[propertyId]);

@@ -9,5 +9,9 @@ import { getTextContent } from './get-text-content';

var _a;
if (!block.properties) {
// TODO: check parent page?
return null;
}
var collection = (_a = recordMap.collection[block.parent_id]) === null || _a === void 0 ? void 0 : _a.value;
if (collection) {
var propertyId = Object.keys(collection.schema).find(function (key) { return collection.schema[key].name === propertyName; });
var propertyId = Object.keys(collection.schema).find(function (key) { var _a; return ((_a = collection.schema[key]) === null || _a === void 0 ? void 0 : _a.name) === propertyName; });
if (propertyId) {

@@ -14,0 +18,0 @@ return getTextContent(block.properties[propertyId]);

4

package.json
{
"name": "notion-utils",
"version": "4.2.0",
"version": "4.2.6",
"description": "Useful utilities for working with Notion data. Isomorphic.",

@@ -24,3 +24,3 @@ "repository": "NotionX/react-notion-x",

},
"gitHead": "af37c43765cce2fca1827ce154e169af047c04cc"
"gitHead": "3f79e70ac0cc31985349ddbfd8b4fbf324316b2e"
}

@@ -14,2 +14,7 @@ import { Block, ExtendedRecordMap } from 'notion-types'

): string | null {
if (!block.properties) {
// TODO: check parent page?
return null
}
const collection = recordMap.collection[block.parent_id]?.value

@@ -19,3 +24,3 @@

const propertyId = Object.keys(collection.schema).find(
(key) => collection.schema[key].name === propertyName
(key) => collection.schema[key]?.name === propertyName
)

@@ -22,0 +27,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc