@murasoftware/next-core
Advanced tools
Comparing version 1.0.50 to 1.0.51
@@ -552,3 +552,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var _temp5 = function () { | ||
if (connectorConfig.codeblocks) { | ||
if (connectorConfig.codeblocks && (context.res || context.browser)) { | ||
return Promise.resolve(Mura.getFeed('codeblock').where().prop('active').isEQ(1).getQuery()).then(function (codeCollection) { | ||
@@ -639,28 +639,2 @@ codeCollection.forEach(function (item) { | ||
var isEditMode = getIsEditMode(); | ||
var _useState = React.useState(false), | ||
mounted = _useState[0], | ||
setMounted = _useState[1]; | ||
React.useEffect(function () { | ||
setMounted(true); | ||
Mura(function () { | ||
var obj = Mura('div[data-instanceid="' + instanceid + '"]'); | ||
if (obj.data('async') == 'true' || obj.data('render') == 'server') { | ||
setTimeout(function () { | ||
var obj = Mura('div[data-instanceid="' + instanceid + '"]'); | ||
var contentCheck = obj.find('.mura-object-content'); | ||
if (!contentCheck.length) { | ||
console.log('rebuilding stale async module because no mura-object-content', instanceid); | ||
obj.processDisplayObject(); | ||
} else if (!contentCheck.children().length) { | ||
console.log('rebuilding stale async module because mura-object-content is empty', instanceid); | ||
obj.processDisplayObject(); | ||
} | ||
}, 2000); | ||
} | ||
}); | ||
}, []); | ||
var objectStyles = {}; | ||
@@ -667,0 +641,0 @@ var metaStyles = {}; |
@@ -1,2 +0,2 @@ | ||
import React, { useEffect, useState, createContext } from 'react'; | ||
import React, { useEffect, createContext } from 'react'; | ||
import Mura from 'mura.js'; | ||
@@ -549,3 +549,3 @@ | ||
var _temp5 = function () { | ||
if (connectorConfig.codeblocks) { | ||
if (connectorConfig.codeblocks && (context.res || context.browser)) { | ||
return Promise.resolve(Mura.getFeed('codeblock').where().prop('active').isEQ(1).getQuery()).then(function (codeCollection) { | ||
@@ -636,28 +636,2 @@ codeCollection.forEach(function (item) { | ||
var isEditMode = getIsEditMode(); | ||
var _useState = useState(false), | ||
mounted = _useState[0], | ||
setMounted = _useState[1]; | ||
useEffect(function () { | ||
setMounted(true); | ||
Mura(function () { | ||
var obj = Mura('div[data-instanceid="' + instanceid + '"]'); | ||
if (obj.data('async') == 'true' || obj.data('render') == 'server') { | ||
setTimeout(function () { | ||
var obj = Mura('div[data-instanceid="' + instanceid + '"]'); | ||
var contentCheck = obj.find('.mura-object-content'); | ||
if (!contentCheck.length) { | ||
console.log('rebuilding stale async module because no mura-object-content', instanceid); | ||
obj.processDisplayObject(); | ||
} else if (!contentCheck.children().length) { | ||
console.log('rebuilding stale async module because mura-object-content is empty', instanceid); | ||
obj.processDisplayObject(); | ||
} | ||
}, 2000); | ||
} | ||
}); | ||
}, []); | ||
var objectStyles = {}; | ||
@@ -664,0 +638,0 @@ var metaStyles = {}; |
{ | ||
"name": "@murasoftware/next-core", | ||
"version": "1.0.50", | ||
"version": "1.0.51", | ||
"description": "Core utilties for Mura.js and Next.js", | ||
@@ -5,0 +5,0 @@ "author": "Mura Software", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
245632
1895