@contember/react-richtext-renderer
Advanced tools
Comparing version 1.3.0-alpha.9 to 1.3.0-alpha.10
@@ -7,5 +7,5 @@ import { defaultDeserialize } from "../internal/defaultDeserialize.js"; | ||
blocks, | ||
referencesField = "references", | ||
sourceField = "source", | ||
referenceDiscriminationField = "type" | ||
referencesField, | ||
sourceField, | ||
referenceDiscriminationField | ||
}) => { | ||
@@ -17,3 +17,3 @@ return useMemo(() => { | ||
return blocks.map((block) => { | ||
if (!(sourceField in block)) { | ||
if (!(sourceFieldResolved in block)) { | ||
throw new RichTextRendererError( | ||
@@ -20,0 +20,0 @@ `Found a block without a '${sourceFieldResolved}' field. ` + (sourceField === void 0 ? `The 'sourceField' prop has not been supplied, and so '${sourceFieldResolved}' was used as a default.` : `That is what the 'sourceField' prop has been set to, and so either this is a typo, or the data supplied is invalid.`) |
@@ -7,5 +7,5 @@ import { defaultDeserialize } from "../internal/defaultDeserialize.js"; | ||
blocks, | ||
referencesField = "references", | ||
sourceField = "source", | ||
referenceDiscriminationField = "type" | ||
referencesField, | ||
sourceField, | ||
referenceDiscriminationField | ||
}) => { | ||
@@ -17,3 +17,3 @@ return useMemo(() => { | ||
return blocks.map((block) => { | ||
if (!(sourceField in block)) { | ||
if (!(sourceFieldResolved in block)) { | ||
throw new RichTextRendererError( | ||
@@ -20,0 +20,0 @@ `Found a block without a '${sourceFieldResolved}' field. ` + (sourceField === void 0 ? `The 'sourceField' prop has not been supplied, and so '${sourceFieldResolved}' was used as a default.` : `That is what the 'sourceField' prop has been set to, and so either this is a typo, or the data supplied is invalid.`) |
{ | ||
"name": "@contember/react-richtext-renderer", | ||
"license": "Apache-2.0", | ||
"version": "1.3.0-alpha.9", | ||
"version": "1.3.0-alpha.10", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "sideEffects": false, |
@@ -9,5 +9,5 @@ import { RichTextBlock, RichTextBlockSource, RichTextElement, RichTextLeaf, RichTextReference, RootEditorNode } from '../types' | ||
blocks, | ||
referencesField = 'references', | ||
sourceField = 'source', | ||
referenceDiscriminationField = 'type', | ||
referencesField, | ||
sourceField, | ||
referenceDiscriminationField, | ||
}: RichTextBlockSource<CustomElements, CustomLeaves>) => { | ||
@@ -20,3 +20,3 @@ return useMemo((): RichTextBlock<CustomElements, CustomLeaves>[] => { | ||
return blocks.map(block => { | ||
if (!(sourceField in block)) { | ||
if (!(sourceFieldResolved in block)) { | ||
throw new RichTextRendererError( | ||
@@ -23,0 +23,0 @@ `Found a block without a '${sourceFieldResolved}' field. ` + |
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
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
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
324535