@vonaffenfels/slate-editor 1.1.65 → 1.1.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonaffenfels/slate-editor",
3
- "version": "1.1.65",
3
+ "version": "1.1.66",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -72,7 +72,7 @@
72
72
  "cssnano": "^5.0.1",
73
73
  "escape-html": "^1.0.3"
74
74
  },
75
- "gitHead": "f14cc08783e4c357ee4c0887fa2965b3d020eda4",
75
+ "gitHead": "5941c51cc7d9f86dda5c8e76e3608098294a8740",
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  }
@@ -69,7 +69,6 @@ export function Serializer({
69
69
  adDefinitionDesktop = [],
70
70
  adDefinitionMobile = [],
71
71
  }) {
72
-
73
72
  const processedValue = useMemo(() => {
74
73
  let val = addAdsToValue(value, adDefinitionDesktop, adDefinitionMobile);
75
74
  val = addFixedPositionsToValue(val, fixedPositions, fixedPositionTypes);
@@ -216,7 +215,7 @@ export function Serializer({
216
215
  node = modifyElementFunc(node);
217
216
  }
218
217
 
219
- if (node.type === "paragraph") {
218
+ if (node.type === "paragraph" && !node.text) {
220
219
  if (!node.children || node.children.length === 0) {
221
220
  return null;
222
221
  }
@@ -234,7 +233,7 @@ export function Serializer({
234
233
  return null;
235
234
  }
236
235
  } catch (e) {
237
- console.error(e)
236
+ console.error(e);
238
237
  }
239
238
 
240
239
  if (!node.children || !node.children.length) {