@vonaffenfels/slate-editor 1.0.66 → 1.0.67
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/componentLoader.js +14 -5
- package/dist/BlockEditor.js +1 -1
- package/dist/Renderer.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/Nodes/StorybookDisplay.js +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.67",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"cssnano": "^5.0.1",
|
|
72
72
|
"escape-html": "^1.0.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2afd3b4e90b44e9305caedc230e4a0bb14b2f9b5",
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
}
|
|
@@ -71,6 +71,10 @@ const BlockComponent = ({
|
|
|
71
71
|
let [LoadedComponent, setLoadedComponent] = useState(storybookComponentLoader(block));
|
|
72
72
|
|
|
73
73
|
useEffect(() => {
|
|
74
|
+
if (!storybookComponentDataLoader) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
const loadData = async () => {
|
|
75
79
|
if (!storybookComponentDataLoader) {
|
|
76
80
|
return;
|
|
@@ -103,8 +107,15 @@ const BlockComponent = ({
|
|
|
103
107
|
if (!LoadedComponent) {
|
|
104
108
|
LoadedComponent = EmptyBlock;
|
|
105
109
|
} else {
|
|
106
|
-
|
|
107
|
-
LoadedComponent.displayName
|
|
110
|
+
try {
|
|
111
|
+
if (!LoadedComponent.displayName) {
|
|
112
|
+
LoadedComponent.displayName = block;
|
|
113
|
+
}
|
|
114
|
+
} catch (e) {
|
|
115
|
+
// this happens if we SSR a non ssr component, its a weird edge case of next/dynamic... so we just ignore it
|
|
116
|
+
// LoadedComponent for some reason is not a component here...
|
|
117
|
+
//console.error(`Error in setting displayName for ${block} :: ${e.message}`);
|
|
118
|
+
return null;
|
|
108
119
|
}
|
|
109
120
|
}
|
|
110
121
|
|