@trops/dash-core 0.1.425 → 0.1.426
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 +14 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +62 -68
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -14317,10 +14317,22 @@ var PanelEditItemHandlers = function PanelEditItemHandlers(_ref) {
|
|
|
14317
14317
|
});
|
|
14318
14318
|
};
|
|
14319
14319
|
|
|
14320
|
+
/**
|
|
14321
|
+
* Return the subset of provider declarations that are user-configurable
|
|
14322
|
+
* (anything except `providerClass: "api"`, which is satisfied by the
|
|
14323
|
+
* app itself and not picked per widget).
|
|
14324
|
+
*
|
|
14325
|
+
* Tolerates malformed input: if the array contains `null`/`undefined`
|
|
14326
|
+
* slots (occasionally seen after a widget install where the registry
|
|
14327
|
+
* ships a sparse `providers` array), those entries are dropped instead
|
|
14328
|
+
* of crashing the whole renderer. Without the null-guard, any caller
|
|
14329
|
+
* inside a React `useMemo` (e.g. WidgetsSection's `uniqueProviders`)
|
|
14330
|
+
* throws at mount and takes the Settings → Widgets pane down with it.
|
|
14331
|
+
*/
|
|
14320
14332
|
var getUserConfigurableProviders = function getUserConfigurableProviders(providers) {
|
|
14321
|
-
if (!providers) return [];
|
|
14333
|
+
if (!Array.isArray(providers)) return [];
|
|
14322
14334
|
return providers.filter(function (p) {
|
|
14323
|
-
return p.providerClass !== "api";
|
|
14335
|
+
return p && p.providerClass !== "api";
|
|
14324
14336
|
});
|
|
14325
14337
|
};
|
|
14326
14338
|
|