@trops/dash-core 0.1.253 → 0.1.255
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/dist/index.esm.js +13 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -142,7 +142,9 @@ var DashboardPublisher = {
|
|
|
142
142
|
if (isObject(listeners) === true) {
|
|
143
143
|
Object.keys(listeners).forEach(function (handlerKey) {
|
|
144
144
|
if (handlerKey in listeners) {
|
|
145
|
-
listeners[handlerKey]
|
|
145
|
+
var events = listeners[handlerKey];
|
|
146
|
+
if (!Array.isArray(events)) return;
|
|
147
|
+
events.forEach(function (event) {
|
|
146
148
|
// subscribe our listeners
|
|
147
149
|
DashboardPublisher.sub(event, handlerMap[handlerKey], uuid);
|
|
148
150
|
});
|
|
@@ -33607,10 +33609,18 @@ function evaluateBundle(source, widgetName) {
|
|
|
33607
33609
|
}
|
|
33608
33610
|
throw new Error("[widgetBundleLoader] Widget \"".concat(widgetName, "\" requires unknown module: \"").concat(name, "\""));
|
|
33609
33611
|
};
|
|
33612
|
+
|
|
33613
|
+
// Provide a process shim so bundles that reference process.env.NODE_ENV
|
|
33614
|
+
// (common in React libraries) don't throw ReferenceError in the sandbox.
|
|
33615
|
+
var process = {
|
|
33616
|
+
env: {
|
|
33617
|
+
NODE_ENV: "production"
|
|
33618
|
+
}
|
|
33619
|
+
};
|
|
33610
33620
|
try {
|
|
33611
33621
|
// eslint-disable-next-line no-new-func
|
|
33612
|
-
var fn = new Function("module", "exports", "require", source);
|
|
33613
|
-
fn(module, exports, require);
|
|
33622
|
+
var fn = new Function("module", "exports", "require", "process", source);
|
|
33623
|
+
fn(module, exports, require, process);
|
|
33614
33624
|
} catch (error) {
|
|
33615
33625
|
throw error;
|
|
33616
33626
|
}
|