@modusoperandi/licit 1.1.7 → 1.2.0

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.
@@ -27,6 +27,11 @@ export default function convertFromJSON(json, schema, defaultSchema, effectivePl
27
27
  // Handle gracefully when error thrown on invalid json
28
28
  var doc = null;
29
29
  try {
30
+ if (undefined === json.content) {
31
+ json.content = [{
32
+ type: 'paragraph'
33
+ }];
34
+ }
30
35
  doc = editorSchema.nodeFromJSON(json);
31
36
  } catch (_unused) {
32
37
  return null;
@@ -38,6 +38,9 @@ export default function convertFromJSON(
38
38
  let doc = null;
39
39
 
40
40
  try {
41
+ if (undefined === json.content) {
42
+ json.content = [{ type: 'paragraph' }];
43
+ }
41
44
  doc = editorSchema.nodeFromJSON(json);
42
45
  } catch {
43
46
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modusoperandi/licit",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "subversion": "1",
@@ -71,12 +71,12 @@
71
71
  "@babel/preset-env": "^7.19.4",
72
72
  "@babel/preset-flow": "^7.10.4",
73
73
  "@babel/preset-react": "^7.18.6",
74
- "@cyclonedx/cyclonedx-npm": "^2.0.0",
74
+ "@cyclonedx/cyclonedx-npm": "^3.0.0",
75
75
  "babel-jest": "^29.2.0",
76
76
  "babel-loader": "^10.0.0",
77
77
  "babel-plugin-flow-react-proptypes": "^26.0.0",
78
78
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
79
- "body-parser": "^1.19.0",
79
+ "body-parser": "^2.2.0",
80
80
  "clean-webpack-plugin": "^4.0.0",
81
81
  "copy-webpack-plugin": "^13.0.0",
82
82
  "copyfiles": "^2.4.1",
@@ -88,9 +88,9 @@
88
88
  "eslint-plugin-prettier": "^5.1.3",
89
89
  "eslint-plugin-react": "^7.33.2",
90
90
  "exports-loader": "^5.0.0",
91
- "express": "^4.17.1",
91
+ "express": "^5.1.0",
92
92
  "file-loader": "^6.2.0",
93
- "flow-bin": "^0.265.3",
93
+ "flow-bin": "^0.267.0",
94
94
  "flow-copy-source": "^2.0.9",
95
95
  "flow-typed": "^4.0.0",
96
96
  "flow-webpack-plugin": "^1.2.0",
@@ -112,7 +112,7 @@
112
112
  "prettier": "^3.2.5",
113
113
  "style-loader": "^4.0.0",
114
114
  "stylelint": "^16.2.1",
115
- "stylelint-config-standard": "^37.0.0",
115
+ "stylelint-config-standard": "^38.0.0",
116
116
  "stylelint-prettier": "^5.0.0",
117
117
  "terser-webpack-plugin": "^5.3.10",
118
118
  "ts-jest": "^29.1.2",