@contentful/field-editor-rich-text 4.17.2 → 4.17.3
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.
|
@@ -33,6 +33,9 @@ const styles = {
|
|
|
33
33
|
};
|
|
34
34
|
function CharCounter({ checkConstraints }) {
|
|
35
35
|
const editor = (0, _hooks.usePlateEditorState)();
|
|
36
|
+
if (!editor.getCharacterCount) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
36
39
|
const count = editor.getCharacterCount();
|
|
37
40
|
const valid = checkConstraints(count);
|
|
38
41
|
return /*#__PURE__*/ _react.default.createElement("span", {
|
|
@@ -18,6 +18,9 @@ const styles = {
|
|
|
18
18
|
};
|
|
19
19
|
function CharCounter({ checkConstraints }) {
|
|
20
20
|
const editor = usePlateEditorState();
|
|
21
|
+
if (!editor.getCharacterCount) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
21
24
|
const count = editor.getCharacterCount();
|
|
22
25
|
const valid = checkConstraints(count);
|
|
23
26
|
return /*#__PURE__*/ React.createElement("span", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-rich-text",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.3",
|
|
4
4
|
"source": "./src/index.tsx",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"registry": "https://npm.pkg.github.com/"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "3171c2d4d2a82856441f5bf69460037cef3933d2"
|
|
95
95
|
}
|