@blocklet/pages-kit 0.7.1 → 0.7.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.
|
@@ -294,6 +294,9 @@ const getComponentByComponentId = ({ componentId, locale, instanceId, }) => {
|
|
|
294
294
|
};
|
|
295
295
|
function usePreloadComponent({ instanceId, componentId, properties, locale, dev }) {
|
|
296
296
|
const previousRef = useRef(undefined);
|
|
297
|
+
if (dev?.mode === 'draft') {
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
297
300
|
const realLocale = getRealLocale(locale);
|
|
298
301
|
const result = getComponentByComponentId({ componentId, locale: realLocale, instanceId });
|
|
299
302
|
if (result) {
|